Text Generation
Transformers
Safetensors
English
gpt2
materials-science
crystallography
generative-ai
inverse-design
chemistry
text-generation-inference
Run this model with HF Jobs
Run c-bone/CrystaLLM-pi_mp_20_base on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs and TRL to fine-tune https://huggingface.co/c-bone/CrystaLLM-pi_mp_20_base. Ask me which dataset to train on, then push the LoRA adapter to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs and Transformers to run batch inference with https://huggingface.co/c-bone/CrystaLLM-pi_mp_20_base on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the predictions back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Evaluate on a benchmark
Use HF Jobs and Lighteval to evaluate https://huggingface.co/c-bone/CrystaLLM-pi_mp_20_base. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.
Quantize for lower memory use
Use HF Jobs to create a 4-bit version of https://huggingface.co/c-bone/CrystaLLM-pi_mp_20_base with Transformers and bitsandbytes. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.
Instructions to use c-bone/CrystaLLM-pi_mp_20_base with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use c-bone/CrystaLLM-pi_mp_20_base with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="c-bone/CrystaLLM-pi_mp_20_base")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("c-bone/CrystaLLM-pi_mp_20_base") model = AutoModelForCausalLM.from_pretrained("c-bone/CrystaLLM-pi_mp_20_base", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use c-bone/CrystaLLM-pi_mp_20_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_mp_20_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_mp_20_base", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/c-bone/CrystaLLM-pi_mp_20_base
- SGLang
How to use c-bone/CrystaLLM-pi_mp_20_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_mp_20_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_mp_20_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_mp_20_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_mp_20_base", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use c-bone/CrystaLLM-pi_mp_20_base with Docker Model Runner:
docker model run hf.co/c-bone/CrystaLLM-pi_mp_20_base
Use the CrystaLLM-pi training config: public c-bone/mp_20_pxrd (same CIFs as the training data), muon_lr, adam_beta2 and min_lr_rate read from the checkpoint
Browse filesFiles changed (2)
- training_args.json+12-14
- training_config.jsonc+10-8
7 unmodified lines8910111213141516171811 unmodified lines303132333435363738394041424344454647484950515253545556573 unmodified lines61626364656667686970717273747576777 unmodified lines"cond_lr": null,"cond_wd": null,"condition_columns": null,"config": "/tmp/claude-1001/-home-cyprien/349b5436-5abc-447d-ba9d-b7a3a8831932/scratchpad/hf_cards/configs/CrystaLLM-pi_mp_20_base/training_config.jsonc","context_extension_warmup_steps": 0,"context_length": 1024,"data_seed": 1,"dataset_HF": "c-bone/cxrd_mp20","deepspeed_config": "_config_files/deepspeed_default.json","do_sample": "True","early_stopping_patience": 15,11 unmodified lines"learning_rate": 0.002,"load_best_model_at_end": true,"logging_steps": 100,"lr_scheduler_kwargs": {},"lr_scheduler_type": "cosine_with_min_lr","max_return_attempts": 1,"max_samples": null,"max_steps": 5000,"metric_for_best_model": "loss","model_ckpt_dir": "model_ckpts/cif-gpt2-small/checkpoint-400","muon_lr": 0.01,"muon_momentum": 0.95,"n_embd": 512,"n_head": 8,"n_hidden_cond": null,"n_layer": 8,"n_prefix_tokens": null,"num_return_sequences": 1,"optimizer": "muon","output_dir": "model_ckpts/mp20-text/","output_parquet": null,"perceiver_depth": 1,"perceiver_dim_head": 64,"perceiver_ff_mult": 2,"perceiver_n_heads": 8,"pretrained_model_dir": null,"pretrained_tokenizer_dir": "HF-cif-tokenizer","remove_CIFs_above_context": false,3 unmodified lines"save_strategy": "steps","save_total_limit": 2,"scoring_mode": "None","screening_profile": "benchmark","seed": 1,"skip_xrd_convert_model": false,"target_valid_cifs": 1,"temperature": 1.0,"top_k": 15,"top_p": 0.95,"torch_compile": true,"tracker_project": "CrystaLLM-cXRD","train_batch_size": 32,"wandb_project_folder": "CrystaLLM-cXRD","warmup_ratio": 0.0,"warmup_steps": null,"weight_decay": 0.17 unmodified lines8910111213141516171811 unmodified lines3031323334353637383940414243444546474849505152535455563 unmodified lines606162636465666768697071727374757 unmodified lines"cond_lr": null,"cond_wd": null,"condition_columns": null,"config": "_config_files/training/unconditional/mp-20-text.jsonc","context_extension_warmup_steps": 0,"context_length": 1024,"data_seed": 1,"dataset_HF": "c-bone/mp_20_pxrd","deepspeed_config": "_config_files/deepspeed_default.json","do_sample": "True","early_stopping_patience": 15,11 unmodified lines"learning_rate": 0.002,"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": 5000,"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": null,"n_hidden_cond": null,"n_layer": 8,"n_prefix_tokens": null,"num_return_sequences": 1,"optimizer": "muon","output_dir": "model_ckpts/mp_20_text/","output_parquet": null,"pretrained_model_dir": null,"pretrained_tokenizer_dir": "HF-cif-tokenizer","remove_CIFs_above_context": false,3 unmodified lines"save_strategy": "steps","save_total_limit": 2,"scoring_mode": "None","screening_profile": "application","seed": 1,"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": "CrystaLLM-lematbench","warmup_ratio": 0.0,"warmup_steps": null,"weight_decay": 0.1
12345678910111212 unmodified lines2526272829301 unmodified line32333435363738394041424344451 unmodified line47484950515253545556575859606162{// Data Arguments//################"dataset_HF": "c-bone/cxrd_mp20","pretrained_tokenizer_dir": "HF-cif-tokenizer","context_length": 1024,"remove_CIFs_above_context": false,"remove_CIFs_with_unk": false,"activate_conditionality": "None",// Model Arguments12 unmodified lines"gradient_accumulation_steps": 1,"learning_rate": 0.002,"lr_scheduler_type": "cosine_with_min_lr","warmup_ratio": 0.0,"adam_beta1": 0.9,"adam_beta2": 0.995,1 unmodified line"weight_decay": 0.1,// optimizer"optimizer": "muon","muon_lr": 0.01,"muon_momentum": 0.95,// Logging"output_dir": "model_ckpts/mp20-text/","save_total_limit": 2,"report_to": "wandb","wandb_project_folder": "CrystaLLM-cXRD","eval_strategy": "steps","eval_steps": 1000,"logging_steps": 100,1 unmodified line"max_steps": 5000,"early_stopping_patience": 15,"early_stopping_threshold": 0.000005,// Utils"seed": 1,"data_seed": 1,"load_best_model_at_end": true,"metric_for_best_model": "loss","torch_compile": true,"deepspeed_config": "_config_files/deepspeed_default.json",// CodeCarbon"codecarbon": true,"tracker_project": "CrystaLLM-cXRD"}123456789101112131412 unmodified lines2728293031323334351 unmodified line373839404142434445464748491 unmodified line5152535455565758596061626364{// Data Arguments//################"dataset_HF": "c-bone/mp_20_pxrd","pretrained_tokenizer_dir": "HF-cif-tokenizer","context_length": 1024,"remove_CIFs_above_context": false,"remove_CIFs_with_unk": false,// Conditioning Arguments//#######################"activate_conditionality": "None",// Model Arguments12 unmodified lines"gradient_accumulation_steps": 1,"learning_rate": 0.002,"lr_scheduler_type": "cosine_with_min_lr","lr_scheduler_kwargs": {"min_lr_rate": 0.01},"warmup_ratio": 0.0,"adam_beta1": 0.9,"adam_beta2": 0.995,1 unmodified line"weight_decay": 0.1,// optimizer"optimizer": "muon","muon_lr": 0.02,"muon_momentum": 0.95,// Logging"output_dir": "model_ckpts/mp_20_text/","save_total_limit": 2,"report_to": "wandb","wandb_project_folder": "CrystaLLM-lematbench","eval_strategy": "steps","eval_steps": 1000,"logging_steps": 100,1 unmodified line"max_steps": 5000,"early_stopping_patience": 15,"early_stopping_threshold": 0.000005,// Utils"seed": 1,"data_seed": 1,"load_best_model_at_end": true,"torch_compile": true,"deepspeed_config": "_config_files/deepspeed_default.json",// CodeCarbon"codecarbon": true,"tracker_project": "CrystaLLM-pi"}
training_args.json+12-14
training_config.jsonc+10-8