Instructions to use CorgiPudding/Qwen2.5-Coder-1.5B-Instruct-Julia with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use CorgiPudding/Qwen2.5-Coder-1.5B-Instruct-Julia with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen2.5-Coder-1.5B-Instruct") model = PeftModel.from_pretrained(base_model, "CorgiPudding/Qwen2.5-Coder-1.5B-Instruct-Julia") - Transformers
How to use CorgiPudding/Qwen2.5-Coder-1.5B-Instruct-Julia with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="CorgiPudding/Qwen2.5-Coder-1.5B-Instruct-Julia") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("CorgiPudding/Qwen2.5-Coder-1.5B-Instruct-Julia", dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use CorgiPudding/Qwen2.5-Coder-1.5B-Instruct-Julia with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "CorgiPudding/Qwen2.5-Coder-1.5B-Instruct-Julia" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "CorgiPudding/Qwen2.5-Coder-1.5B-Instruct-Julia", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/CorgiPudding/Qwen2.5-Coder-1.5B-Instruct-Julia
- SGLang
How to use CorgiPudding/Qwen2.5-Coder-1.5B-Instruct-Julia 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 "CorgiPudding/Qwen2.5-Coder-1.5B-Instruct-Julia" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "CorgiPudding/Qwen2.5-Coder-1.5B-Instruct-Julia", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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 "CorgiPudding/Qwen2.5-Coder-1.5B-Instruct-Julia" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "CorgiPudding/Qwen2.5-Coder-1.5B-Instruct-Julia", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use CorgiPudding/Qwen2.5-Coder-1.5B-Instruct-Julia with Docker Model Runner:
docker model run hf.co/CorgiPudding/Qwen2.5-Coder-1.5B-Instruct-Julia
| { | |
| "best_global_step": null, | |
| "best_metric": null, | |
| "best_model_checkpoint": null, | |
| "epoch": 2.0, | |
| "eval_steps": 3000, | |
| "global_step": 9064, | |
| "is_hyper_param_search": false, | |
| "is_local_process_zero": true, | |
| "is_world_process_zero": true, | |
| "log_history": [ | |
| { | |
| "epoch": 0.13241379310344828, | |
| "grad_norm": 0.2709992527961731, | |
| "learning_rate": 6.604189636163176e-05, | |
| "loss": 0.4358, | |
| "step": 600 | |
| }, | |
| { | |
| "epoch": 0.26482758620689656, | |
| "grad_norm": 0.17993643879890442, | |
| "learning_rate": 9.968414572743643e-05, | |
| "loss": 0.0466, | |
| "step": 1200 | |
| }, | |
| { | |
| "epoch": 0.3972413793103448, | |
| "grad_norm": 0.17993822693824768, | |
| "learning_rate": 9.70783181950037e-05, | |
| "loss": 0.0417, | |
| "step": 1800 | |
| }, | |
| { | |
| "epoch": 0.5296551724137931, | |
| "grad_norm": 0.2322826236486435, | |
| "learning_rate": 9.19696754273079e-05, | |
| "loss": 0.0389, | |
| "step": 2400 | |
| }, | |
| { | |
| "epoch": 0.6620689655172414, | |
| "grad_norm": 0.16364118456840515, | |
| "learning_rate": 8.462980718032852e-05, | |
| "loss": 0.0393, | |
| "step": 3000 | |
| }, | |
| { | |
| "epoch": 0.6620689655172414, | |
| "eval_loss": 0.03762035071849823, | |
| "eval_runtime": 92.878, | |
| "eval_samples_per_second": 323.004, | |
| "eval_steps_per_second": 20.188, | |
| "step": 3000 | |
| }, | |
| { | |
| "epoch": 0.7944827586206896, | |
| "grad_norm": 0.1851811707019806, | |
| "learning_rate": 7.544892140493736e-05, | |
| "loss": 0.0375, | |
| "step": 3600 | |
| }, | |
| { | |
| "epoch": 0.926896551724138, | |
| "grad_norm": 0.17068427801132202, | |
| "learning_rate": 6.49150996994762e-05, | |
| "loss": 0.0373, | |
| "step": 4200 | |
| }, | |
| { | |
| "epoch": 1.059144827586207, | |
| "grad_norm": 0.1241922676563263, | |
| "learning_rate": 5.358834952514551e-05, | |
| "loss": 0.0332, | |
| "step": 4800 | |
| }, | |
| { | |
| "epoch": 1.1915586206896551, | |
| "grad_norm": 0.13463670015335083, | |
| "learning_rate": 4.2070832641099686e-05, | |
| "loss": 0.0303, | |
| "step": 5400 | |
| }, | |
| { | |
| "epoch": 1.3239724137931035, | |
| "grad_norm": 0.20478974282741547, | |
| "learning_rate": 3.097485249901231e-05, | |
| "loss": 0.031, | |
| "step": 6000 | |
| }, | |
| { | |
| "epoch": 1.3239724137931035, | |
| "eval_loss": 0.035575784742832184, | |
| "eval_runtime": 93.0574, | |
| "eval_samples_per_second": 322.382, | |
| "eval_steps_per_second": 20.149, | |
| "step": 6000 | |
| }, | |
| { | |
| "epoch": 1.4563862068965516, | |
| "grad_norm": 0.22410421073436737, | |
| "learning_rate": 2.089030247686608e-05, | |
| "loss": 0.0301, | |
| "step": 6600 | |
| }, | |
| { | |
| "epoch": 1.5888, | |
| "grad_norm": 0.23571571707725525, | |
| "learning_rate": 1.2353305495017958e-05, | |
| "loss": 0.0297, | |
| "step": 7200 | |
| }, | |
| { | |
| "epoch": 1.7212137931034484, | |
| "grad_norm": 0.1075667217373848, | |
| "learning_rate": 5.817712220372823e-06, | |
| "loss": 0.029, | |
| "step": 7800 | |
| }, | |
| { | |
| "epoch": 1.8536275862068967, | |
| "grad_norm": 0.11598219722509384, | |
| "learning_rate": 1.6309730939492506e-06, | |
| "loss": 0.0296, | |
| "step": 8400 | |
| }, | |
| { | |
| "epoch": 1.9860413793103449, | |
| "grad_norm": 0.23589642345905304, | |
| "learning_rate": 1.56668924206127e-08, | |
| "loss": 0.0297, | |
| "step": 9000 | |
| }, | |
| { | |
| "epoch": 1.9860413793103449, | |
| "eval_loss": 0.03463894873857498, | |
| "eval_runtime": 93.0156, | |
| "eval_samples_per_second": 322.526, | |
| "eval_steps_per_second": 20.158, | |
| "step": 9000 | |
| }, | |
| { | |
| "epoch": 2.0, | |
| "step": 9064, | |
| "total_flos": 2.252979556375855e+18, | |
| "train_loss": 0.06108480966785579, | |
| "train_runtime": 11818.6761, | |
| "train_samples_per_second": 98.15, | |
| "train_steps_per_second": 0.767 | |
| } | |
| ], | |
| "logging_steps": 600, | |
| "max_steps": 9064, | |
| "num_input_tokens_seen": 0, | |
| "num_train_epochs": 2, | |
| "save_steps": 3000, | |
| "stateful_callbacks": { | |
| "TrainerControl": { | |
| "args": { | |
| "should_epoch_stop": false, | |
| "should_evaluate": false, | |
| "should_log": false, | |
| "should_save": true, | |
| "should_training_stop": true | |
| }, | |
| "attributes": {} | |
| } | |
| }, | |
| "total_flos": 2.252979556375855e+18, | |
| "train_batch_size": 4, | |
| "trial_name": null, | |
| "trial_params": null | |
| } | |