Text Generation
Transformers
Safetensors
English
gpt2
materials-science
crystallography
generative-ai
inverse-design
chemistry
xrd
text-generation-inference
Instructions to use c-bone/CrystaLLM-pi_Chili100K-XRD with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use c-bone/CrystaLLM-pi_Chili100K-XRD with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="c-bone/CrystaLLM-pi_Chili100K-XRD")# Load model directly from transformers import AutoTokenizer, SliderGPT tokenizer = AutoTokenizer.from_pretrained("c-bone/CrystaLLM-pi_Chili100K-XRD") model = SliderGPT.from_pretrained("c-bone/CrystaLLM-pi_Chili100K-XRD") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use c-bone/CrystaLLM-pi_Chili100K-XRD with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "c-bone/CrystaLLM-pi_Chili100K-XRD" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "c-bone/CrystaLLM-pi_Chili100K-XRD", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/c-bone/CrystaLLM-pi_Chili100K-XRD
- SGLang
How to use c-bone/CrystaLLM-pi_Chili100K-XRD with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "c-bone/CrystaLLM-pi_Chili100K-XRD" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "c-bone/CrystaLLM-pi_Chili100K-XRD", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "c-bone/CrystaLLM-pi_Chili100K-XRD" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "c-bone/CrystaLLM-pi_Chili100K-XRD", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use c-bone/CrystaLLM-pi_Chili100K-XRD with Docker Model Runner:
docker model run hf.co/c-bone/CrystaLLM-pi_Chili100K-XRD
Upload Slider model checkpoint
Browse files- config.json +38 -0
- model.safetensors +3 -0
- tokenizer_config.json +1 -0
config.json
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_name_or_path": "model_ckpts/mattergen_XRD/slider_ft/checkpoint-405000",
|
| 3 |
+
"activation_function": "gelu_new",
|
| 4 |
+
"architectures": [
|
| 5 |
+
"SliderGPT"
|
| 6 |
+
],
|
| 7 |
+
"attn_pdrop": 0.1,
|
| 8 |
+
"bos_token_id": 372,
|
| 9 |
+
"embd_pdrop": 0.1,
|
| 10 |
+
"eos_token_id": 373,
|
| 11 |
+
"initializer_range": 0.02,
|
| 12 |
+
"layer_norm_epsilon": 1e-05,
|
| 13 |
+
"model_type": "gpt2",
|
| 14 |
+
"n_embd": 512,
|
| 15 |
+
"n_head": 8,
|
| 16 |
+
"n_inner": null,
|
| 17 |
+
"n_layer": 8,
|
| 18 |
+
"n_positions": 1536,
|
| 19 |
+
"pad_token_id": 371,
|
| 20 |
+
"reorder_and_upcast_attn": false,
|
| 21 |
+
"resid_pdrop": 0.1,
|
| 22 |
+
"scale_attn_by_inverse_layer_idx": false,
|
| 23 |
+
"scale_attn_weights": true,
|
| 24 |
+
"slider_dropout": 0.196393312280024,
|
| 25 |
+
"slider_n_heads_sharing_slider": 2,
|
| 26 |
+
"slider_n_hidden": 64,
|
| 27 |
+
"slider_n_variables": 40,
|
| 28 |
+
"slider_on": true,
|
| 29 |
+
"summary_activation": null,
|
| 30 |
+
"summary_first_dropout": 0.1,
|
| 31 |
+
"summary_proj_to_labels": true,
|
| 32 |
+
"summary_type": "cls_index",
|
| 33 |
+
"summary_use_proj": true,
|
| 34 |
+
"torch_dtype": "float32",
|
| 35 |
+
"transformers_version": "4.48.0",
|
| 36 |
+
"use_cache": true,
|
| 37 |
+
"vocab_size": 377
|
| 38 |
+
}
|
model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:aaf7f836dc5e78caf4a195304eb901b2c484fd6b5ab3dc39ae33292e6811a836
|
| 3 |
+
size 190749584
|
tokenizer_config.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"unk_token": "<unk>", "vocab_size": 377, "tokenizer_class": "CustomCIFTokenizer"}
|