Inference with vLLM
The serving path inserts projected scientific vectors into a language model’s full templated prompt embeddings and sends them to vLLM through prompt_embeds at /v1/completions. Scientific features and projection are prepared in the client; the language-model service generates the answer.
Start the language-model service
Install vLLM in a compatible inference environment. Run it on suitable GPUs and set tensor parallelism for that model and hardware. This command shows an eight-way deployment example:
Serve the language-model snapshot named in the selected checkpoint’s config.json. A different snapshot changes the embedding table the client reads from.
Generate from prepared crystal features
The crystal client renders the checkpoint’s native chat template, looks up text embeddings, inserts scientific vectors, and sends the completed prompt embeddings to the server.
Prepare cif_features.pt as a tensor of shape [num_atoms, 64], containing the real CHGNet 0.3.0 atom states specified in cif/jarvis, in atom order. Once the server is ready, run:
The local language-model directory supplies the tokenizer, configuration, and sharded input embedding table used by the server. The client reads the needed text embedding rows without loading the full language model.
Other tasks
Scientific feature extraction and task-adapted scientific models are separate dependencies; some adapted scientific weights are not yet included in the release. Match each task’s scientific_inputs before preparing predictions. The crystal example starts from prepared features, while other tasks require their corresponding input preparation and prompt assembly.
For a second worked path, including feature extraction from raw signals, see the NEU06 example.