Instructions to use CMU-AIR2/code-ArithHardC12-mixgh-240421 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use CMU-AIR2/code-ArithHardC12-mixgh-240421 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="CMU-AIR2/code-ArithHardC12-mixgh-240421")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("CMU-AIR2/code-ArithHardC12-mixgh-240421") model = AutoModelForCausalLM.from_pretrained("CMU-AIR2/code-ArithHardC12-mixgh-240421", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use CMU-AIR2/code-ArithHardC12-mixgh-240421 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "CMU-AIR2/code-ArithHardC12-mixgh-240421" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "CMU-AIR2/code-ArithHardC12-mixgh-240421", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/CMU-AIR2/code-ArithHardC12-mixgh-240421
- SGLang
How to use CMU-AIR2/code-ArithHardC12-mixgh-240421 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 "CMU-AIR2/code-ArithHardC12-mixgh-240421" \ --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": "CMU-AIR2/code-ArithHardC12-mixgh-240421", "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 "CMU-AIR2/code-ArithHardC12-mixgh-240421" \ --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": "CMU-AIR2/code-ArithHardC12-mixgh-240421", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use CMU-AIR2/code-ArithHardC12-mixgh-240421 with Docker Model Runner:
docker model run hf.co/CMU-AIR2/code-ArithHardC12-mixgh-240421
Download trainer_state.json from CMU-AIR2/code-ArithHardC12-mixgh-240421: direct link, hf CLI and curl.
- Browser
- Download file 6.48 kB
-
https://huggingface.co/CMU-AIR2/code-ArithHardC12-mixgh-240421/resolve/main/trainer_state.json
- Command line
-
hf download hf://CMU-AIR2/code-ArithHardC12-mixgh-240421/trainer_state.json
-
curl -L -o trainer_state.json https://huggingface.co/CMU-AIR2/code-ArithHardC12-mixgh-240421/resolve/main/trainer_state.json
6.48 kB
| { | |
| "best_metric": null, | |
| "best_model_checkpoint": null, | |
| "epoch": 3.5, | |
| "eval_steps": 17500, | |
| "global_step": 35000, | |
| "is_hyper_param_search": false, | |
| "is_local_process_zero": true, | |
| "is_world_process_zero": true, | |
| "log_history": [ | |
| { | |
| "epoch": 0.1, | |
| "grad_norm": 1.1427639722824097, | |
| "learning_rate": 1.9712463768115945e-05, | |
| "loss": 0.8488, | |
| "step": 1000 | |
| }, | |
| { | |
| "epoch": 0.2, | |
| "grad_norm": 1.295353651046753, | |
| "learning_rate": 1.9132753623188406e-05, | |
| "loss": 0.7965, | |
| "step": 2000 | |
| }, | |
| { | |
| "epoch": 0.3, | |
| "grad_norm": 1.2221827507019043, | |
| "learning_rate": 1.855304347826087e-05, | |
| "loss": 0.7858, | |
| "step": 3000 | |
| }, | |
| { | |
| "epoch": 0.4, | |
| "grad_norm": 0.9316444993019104, | |
| "learning_rate": 1.7973333333333333e-05, | |
| "loss": 0.7841, | |
| "step": 4000 | |
| }, | |
| { | |
| "epoch": 0.5, | |
| "grad_norm": 0.7418642044067383, | |
| "learning_rate": 1.7393623188405798e-05, | |
| "loss": 0.7773, | |
| "step": 5000 | |
| }, | |
| { | |
| "epoch": 0.6, | |
| "grad_norm": 0.8065320253372192, | |
| "learning_rate": 1.6813913043478263e-05, | |
| "loss": 0.769, | |
| "step": 6000 | |
| }, | |
| { | |
| "epoch": 0.7, | |
| "grad_norm": 1.1335772275924683, | |
| "learning_rate": 1.6234202898550724e-05, | |
| "loss": 0.7678, | |
| "step": 7000 | |
| }, | |
| { | |
| "epoch": 0.8, | |
| "grad_norm": 0.7617415189743042, | |
| "learning_rate": 1.565449275362319e-05, | |
| "loss": 0.7622, | |
| "step": 8000 | |
| }, | |
| { | |
| "epoch": 0.9, | |
| "grad_norm": 2.318528413772583, | |
| "learning_rate": 1.5074782608695653e-05, | |
| "loss": 0.7638, | |
| "step": 9000 | |
| }, | |
| { | |
| "epoch": 1.0, | |
| "grad_norm": 0.8935675621032715, | |
| "learning_rate": 1.4495072463768116e-05, | |
| "loss": 0.7555, | |
| "step": 10000 | |
| }, | |
| { | |
| "epoch": 1.1, | |
| "grad_norm": 1.0269213914871216, | |
| "learning_rate": 1.3915362318840582e-05, | |
| "loss": 0.6674, | |
| "step": 11000 | |
| }, | |
| { | |
| "epoch": 1.2, | |
| "grad_norm": 1.0384411811828613, | |
| "learning_rate": 1.3335652173913046e-05, | |
| "loss": 0.6693, | |
| "step": 12000 | |
| }, | |
| { | |
| "epoch": 1.3, | |
| "grad_norm": 0.9560378193855286, | |
| "learning_rate": 1.2755942028985509e-05, | |
| "loss": 0.6716, | |
| "step": 13000 | |
| }, | |
| { | |
| "epoch": 1.4, | |
| "grad_norm": 0.8821602463722229, | |
| "learning_rate": 1.2176231884057972e-05, | |
| "loss": 0.6674, | |
| "step": 14000 | |
| }, | |
| { | |
| "epoch": 1.5, | |
| "grad_norm": 1.1022319793701172, | |
| "learning_rate": 1.1597101449275363e-05, | |
| "loss": 0.6644, | |
| "step": 15000 | |
| }, | |
| { | |
| "epoch": 1.6, | |
| "grad_norm": 1.0467220544815063, | |
| "learning_rate": 1.1017391304347826e-05, | |
| "loss": 0.6624, | |
| "step": 16000 | |
| }, | |
| { | |
| "epoch": 1.7, | |
| "grad_norm": 1.3060600757598877, | |
| "learning_rate": 1.043768115942029e-05, | |
| "loss": 0.6653, | |
| "step": 17000 | |
| }, | |
| { | |
| "epoch": 1.75, | |
| "eval_loss": 0.7719004154205322, | |
| "eval_runtime": 101.1437, | |
| "eval_samples_per_second": 19.774, | |
| "eval_steps_per_second": 2.472, | |
| "step": 17500 | |
| }, | |
| { | |
| "epoch": 1.8, | |
| "grad_norm": 0.9809356927871704, | |
| "learning_rate": 9.857971014492754e-06, | |
| "loss": 0.6609, | |
| "step": 18000 | |
| }, | |
| { | |
| "epoch": 1.9, | |
| "grad_norm": 1.2537463903427124, | |
| "learning_rate": 9.279420289855074e-06, | |
| "loss": 0.6646, | |
| "step": 19000 | |
| }, | |
| { | |
| "epoch": 2.0, | |
| "grad_norm": 1.2699357271194458, | |
| "learning_rate": 8.699710144927537e-06, | |
| "loss": 0.6597, | |
| "step": 20000 | |
| }, | |
| { | |
| "epoch": 2.1, | |
| "grad_norm": 0.926004946231842, | |
| "learning_rate": 8.120000000000002e-06, | |
| "loss": 0.5656, | |
| "step": 21000 | |
| }, | |
| { | |
| "epoch": 2.2, | |
| "grad_norm": 1.199065923690796, | |
| "learning_rate": 7.540289855072464e-06, | |
| "loss": 0.5765, | |
| "step": 22000 | |
| }, | |
| { | |
| "epoch": 2.3, | |
| "grad_norm": 1.3075120449066162, | |
| "learning_rate": 6.961159420289856e-06, | |
| "loss": 0.5737, | |
| "step": 23000 | |
| }, | |
| { | |
| "epoch": 2.4, | |
| "grad_norm": 1.2956862449645996, | |
| "learning_rate": 6.382028985507247e-06, | |
| "loss": 0.5668, | |
| "step": 24000 | |
| }, | |
| { | |
| "epoch": 2.5, | |
| "grad_norm": 1.5514229536056519, | |
| "learning_rate": 5.80231884057971e-06, | |
| "loss": 0.5674, | |
| "step": 25000 | |
| }, | |
| { | |
| "epoch": 2.6, | |
| "grad_norm": 1.0971230268478394, | |
| "learning_rate": 5.222608695652175e-06, | |
| "loss": 0.5725, | |
| "step": 26000 | |
| }, | |
| { | |
| "epoch": 2.7, | |
| "grad_norm": 1.1359177827835083, | |
| "learning_rate": 4.643478260869566e-06, | |
| "loss": 0.5693, | |
| "step": 27000 | |
| }, | |
| { | |
| "epoch": 2.8, | |
| "grad_norm": 1.0388602018356323, | |
| "learning_rate": 4.06376811594203e-06, | |
| "loss": 0.5583, | |
| "step": 28000 | |
| }, | |
| { | |
| "epoch": 2.9, | |
| "grad_norm": 1.0011905431747437, | |
| "learning_rate": 3.4846376811594208e-06, | |
| "loss": 0.5643, | |
| "step": 29000 | |
| }, | |
| { | |
| "epoch": 3.0, | |
| "grad_norm": 1.0876168012619019, | |
| "learning_rate": 2.904927536231884e-06, | |
| "loss": 0.5647, | |
| "step": 30000 | |
| }, | |
| { | |
| "epoch": 3.1, | |
| "grad_norm": 1.2214146852493286, | |
| "learning_rate": 2.325217391304348e-06, | |
| "loss": 0.4977, | |
| "step": 31000 | |
| }, | |
| { | |
| "epoch": 3.2, | |
| "grad_norm": 1.4341120719909668, | |
| "learning_rate": 1.7455072463768116e-06, | |
| "loss": 0.4908, | |
| "step": 32000 | |
| }, | |
| { | |
| "epoch": 3.3, | |
| "grad_norm": 1.2273516654968262, | |
| "learning_rate": 1.166376811594203e-06, | |
| "loss": 0.4934, | |
| "step": 33000 | |
| }, | |
| { | |
| "epoch": 3.4, | |
| "grad_norm": 1.446751356124878, | |
| "learning_rate": 5.866666666666667e-07, | |
| "loss": 0.4886, | |
| "step": 34000 | |
| }, | |
| { | |
| "epoch": 3.5, | |
| "grad_norm": 0.9594036936759949, | |
| "learning_rate": 6.956521739130436e-09, | |
| "loss": 0.4948, | |
| "step": 35000 | |
| }, | |
| { | |
| "epoch": 3.5, | |
| "eval_loss": 0.8087719082832336, | |
| "eval_runtime": 99.7391, | |
| "eval_samples_per_second": 20.052, | |
| "eval_steps_per_second": 2.507, | |
| "step": 35000 | |
| } | |
| ], | |
| "logging_steps": 1000, | |
| "max_steps": 35000, | |
| "num_input_tokens_seen": 0, | |
| "num_train_epochs": 4, | |
| "save_steps": 17500, | |
| "total_flos": 4.40543553257472e+18, | |
| "train_batch_size": 8, | |
| "trial_name": null, | |
| "trial_params": null | |
| } | |