Text Generation
Transformers
Safetensors
English
gpt2
materials-science
crystallography
generative-ai
inverse-design
chemistry
unconditional
text-generation-inference
Instructions to use c-bone/CrystaLLM-pi_base with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use c-bone/CrystaLLM-pi_base with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="c-bone/CrystaLLM-pi_base")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("c-bone/CrystaLLM-pi_base") model = AutoModelForCausalLM.from_pretrained("c-bone/CrystaLLM-pi_base", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use c-bone/CrystaLLM-pi_base 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_base" # 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_base", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/c-bone/CrystaLLM-pi_base
- SGLang
How to use c-bone/CrystaLLM-pi_base 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_base" \ --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_base", "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_base" \ --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_base", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use c-bone/CrystaLLM-pi_base with Docker Model Runner:
docker model run hf.co/c-bone/CrystaLLM-pi_base
Add the training config that produced this checkpoint
Browse files- training_config.jsonc +72 -0
training_config.jsonc
ADDED
|
@@ -0,0 +1,72 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
// Data Arguments
|
| 3 |
+
//################
|
| 4 |
+
"dataset_HF": "c-bone/lematerial_clean",
|
| 5 |
+
"pretrained_tokenizer_dir": "HF-cif-tokenizer",
|
| 6 |
+
"context_length": 1024,
|
| 7 |
+
"dataset_streaming": false,
|
| 8 |
+
// Filters
|
| 9 |
+
"remove_CIFs_above_context": false,
|
| 10 |
+
"remove_CIFs_with_unk": true,
|
| 11 |
+
|
| 12 |
+
// Conditional Arguments
|
| 13 |
+
//#######################
|
| 14 |
+
"activate_conditionality": "None",
|
| 15 |
+
|
| 16 |
+
// Model Arguments
|
| 17 |
+
//#################
|
| 18 |
+
// Model Depth
|
| 19 |
+
"n_embd": 512,
|
| 20 |
+
"n_layer": 8,
|
| 21 |
+
"n_head": 8,
|
| 22 |
+
// Dropout
|
| 23 |
+
"residual_dropout": 0.1,
|
| 24 |
+
"embedding_dropout": 0.1,
|
| 25 |
+
"attention_dropout": 0.1,
|
| 26 |
+
|
| 27 |
+
// Trainer Arguments
|
| 28 |
+
//###################
|
| 29 |
+
// Batching
|
| 30 |
+
"train_batch_size": 32,
|
| 31 |
+
"eval_batch_size": 32,
|
| 32 |
+
"gradient_accumulation_steps": 1,
|
| 33 |
+
"auto_find_batch_size": false,
|
| 34 |
+
// Learning Rate and Optimizer
|
| 35 |
+
"learning_rate": 0.001,
|
| 36 |
+
"lr_scheduler_type": "cosine_with_min_lr",
|
| 37 |
+
"lr_scheduler_kwargs": {
|
| 38 |
+
"min_lr_rate": 0.001
|
| 39 |
+
},
|
| 40 |
+
"warmup_steps": 0,
|
| 41 |
+
"adam_beta1": 0.85,
|
| 42 |
+
"adam_beta2": 0.98,
|
| 43 |
+
"grad_clip": 1.0,
|
| 44 |
+
"weight_decay": 0.1,
|
| 45 |
+
// Logging
|
| 46 |
+
"output_dir": "model_ckpts/mpdb-small-base-lematerial",
|
| 47 |
+
"save_total_limit": 2,
|
| 48 |
+
"report_to": "wandb",
|
| 49 |
+
"eval_strategy": "steps",
|
| 50 |
+
"eval_steps": 5000,
|
| 51 |
+
"logging_steps": 500,
|
| 52 |
+
"save_strategy": "steps",
|
| 53 |
+
"max_steps": 1250000,
|
| 54 |
+
"early_stopping_patience": 10,
|
| 55 |
+
"early_stopping_threshold": 0.00001,
|
| 56 |
+
// Utils
|
| 57 |
+
// 42 is what the released checkpoint's training_args.bin records: this run predates the
|
| 58 |
+
// seed being passed through from the config, so the Trainer default applied.
|
| 59 |
+
"seed": 42,
|
| 60 |
+
"data_seed": 1,
|
| 61 |
+
"load_best_model_at_end": true,
|
| 62 |
+
"metric_for_best_model": "eval_loss",
|
| 63 |
+
"greater_is_better": false,
|
| 64 |
+
"torch_compile": true,
|
| 65 |
+
"fp16": true,
|
| 66 |
+
"deepspeed_config": "_config_files/deepspeed_default.json",
|
| 67 |
+
|
| 68 |
+
// CodeCarbon Arguments
|
| 69 |
+
//######################
|
| 70 |
+
"codecarbon": true,
|
| 71 |
+
"tracker_project": "CrystaLLM-pi"
|
| 72 |
+
}
|