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")# pip install -U transformers accelerate # 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", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- 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
Download training_args.json from c-bone/CrystaLLM-pi_Chili100K-XRD: direct link, hf CLI and curl.
- Browser
- Download file 2.26 kB
-
https://huggingface.co/c-bone/CrystaLLM-pi_Chili100K-XRD/resolve/main/training_args.json
- Command line
-
hf download hf://c-bone/CrystaLLM-pi_Chili100K-XRD/training_args.json
-
curl -L -o training_args.json https://huggingface.co/c-bone/CrystaLLM-pi_Chili100K-XRD/resolve/main/training_args.json
2.26 kB
| { | |
| "activate_conditionality": "Slider", | |
| "adam_beta1": 0.9, | |
| "adam_beta2": 0.999, | |
| "attention_dropout": 0.1, | |
| "auto_find_batch_size": false, | |
| "codecarbon": true, | |
| "cond_dropout": 0.196, | |
| "cond_lr": 0.0055, | |
| "cond_wd": 0.0605, | |
| "condition_columns": "['condition_vector']", | |
| "config": "/tmp/claude-1001/-home-cyprien/349b5436-5abc-447d-ba9d-b7a3a8831932/scratchpad/hf_cards/configs/CrystaLLM-pi_Chili100K-XRD/training_config.jsonc", | |
| "context_length": 1536, | |
| "data_seed": 1, | |
| "dataset_HF": "c-bone/chili100k_strat", | |
| "deepspeed_config": "_config_files/deepspeed_default.json", | |
| "do_sample": "True", | |
| "early_stopping_patience": 15, | |
| "early_stopping_threshold": 5e-05, | |
| "embedding_dropout": 0.1, | |
| "eval_batch_size": 32, | |
| "eval_steps": 500, | |
| "eval_strategy": "steps", | |
| "fp16": true, | |
| "gen_max_length": 1024, | |
| "grad_clip": 1.0, | |
| "gradient_accumulation_steps": 1, | |
| "greater_is_better": false, | |
| "input_parquet": null, | |
| "learning_rate": 0.00489, | |
| "load_best_model_at_end": true, | |
| "logging_steps": 100, | |
| "lr_scheduler_kwargs": { | |
| "min_lr_rate": 0.01 | |
| }, | |
| "lr_scheduler_type": "cosine_with_min_lr", | |
| "max_return_attempts": 1, | |
| "max_samples": null, | |
| "max_steps": 2500, | |
| "metric_for_best_model": "eval_loss", | |
| "model_ckpt_dir": "model_ckpts/cif-gpt2-small/checkpoint-400", | |
| "muon_lr": 0.02, | |
| "muon_momentum": 0.95, | |
| "n_embd": 512, | |
| "n_head": 8, | |
| "n_heads_sharing_slider": 2, | |
| "n_hidden_cond": 64, | |
| "n_layer": 8, | |
| "n_prefix_tokens": 40, | |
| "num_return_sequences": 1, | |
| "optimizer": "adamw", | |
| "output_dir": "model_ckpts/chili100k-xrd-slider-opt/", | |
| "output_parquet": null, | |
| "pretrained_model_dir": "model_ckpts/mattergen_XRD/slider_ft/checkpoint-405000", | |
| "pretrained_tokenizer_dir": "HF-cif-tokenizer", | |
| "remove_CIFs_above_context": false, | |
| "remove_CIFs_with_unk": true, | |
| "report_to": "wandb", | |
| "residual_dropout": 0.1, | |
| "save_strategy": "steps", | |
| "save_total_limit": 2, | |
| "scoring_mode": "None", | |
| "seed": 1, | |
| "share_layers": false, | |
| "target_valid_cifs": 1, | |
| "temperature": 1.0, | |
| "top_k": 15, | |
| "top_p": 0.95, | |
| "torch_compile": true, | |
| "tracker_project": "CrystaLLM-pi", | |
| "train_batch_size": 32, | |
| "wandb_project_folder": "Chili", | |
| "warmup_ratio": 0.0784, | |
| "warmup_steps": null, | |
| "weight_decay": 0.0743 | |
| } | |