ealharbi/crystallography-assistant
Crystallography assistant
Language models fine-tuned on confirmed question-and-answer pairs from four macromolecular crystallography mailing lists: CCP4BB, CCP-EM, phenixbb and the COOT list.
Choosing a model
The dropdown lists every variant an adapter has been configured for. Small models (7B/8B) answer in a few seconds on a modest GPU; the large variants (70B–123B) need a correspondingly large Space, and switching between sizes reloads weights, so the first question after a change is slower.
Configuration
Set these under Settings → Variables and secrets. Only the variants you configure appear in the dropdown.
Additional settings:
Hardware
ZeroGPU is the practical choice: a GPU is allocated per request and released afterwards, so an idle Space costs nothing. Generation is wrapped in @spaces.GPU with a 240-second window, which has to cover loading the weights on a cold start as well as producing the answer.
Only the 7B/8B variants are realistic on ZeroGPU. The 70B and 123B variants need 140–246 GB of dedicated accelerator memory, or LOAD_IN_4BIT=1 to fit them in roughly a quarter of that at some cost in answer quality.
On dedicated hardware or CPU the spaces package is absent and the decorator becomes a no-op, so the same code runs unchanged.
Retrieval
If an index_docs/ directory is present, the Use CCP4 documentation checkbox retrieves relevant documentation sections and supplies them to the model, listing the sources used beneath the answer. Without the index the app still runs and the checkbox reports that retrieval is unavailable.
Data and limitations
Training pairs were threaded from public archives by Message-ID, cleaned of quoted history and signatures, and retained only where at least two of three adjudicating models agreed the answer was confirmed — either explicitly by the asker or by agreement among repliers.
Answers are generated and may be wrong. Verify anything consequential against the program documentation and the primary literature.
