Instructions to use CorgiPudding/Qwen2.5-Coder-7B-Julia with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use CorgiPudding/Qwen2.5-Coder-7B-Julia with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen2.5-Coder-7B") model = PeftModel.from_pretrained(base_model, "CorgiPudding/Qwen2.5-Coder-7B-Julia") - Transformers
How to use CorgiPudding/Qwen2.5-Coder-7B-Julia with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="CorgiPudding/Qwen2.5-Coder-7B-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-7B-Julia", dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use CorgiPudding/Qwen2.5-Coder-7B-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-7B-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-7B-Julia", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/CorgiPudding/Qwen2.5-Coder-7B-Julia
- SGLang
How to use CorgiPudding/Qwen2.5-Coder-7B-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-7B-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-7B-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-7B-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-7B-Julia", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use CorgiPudding/Qwen2.5-Coder-7B-Julia with Docker Model Runner:
docker model run hf.co/CorgiPudding/Qwen2.5-Coder-7B-Julia
| { | |
| "best_global_step": null, | |
| "best_metric": null, | |
| "best_model_checkpoint": null, | |
| "epoch": 2.0, | |
| "eval_steps": 4000, | |
| "global_step": 9064, | |
| "is_hyper_param_search": false, | |
| "is_local_process_zero": true, | |
| "is_world_process_zero": true, | |
| "log_history": [ | |
| { | |
| "epoch": 0.17655172413793102, | |
| "grad_norm": 0.11938353627920151, | |
| "learning_rate": 8.809261300992283e-05, | |
| "loss": 1.2362, | |
| "step": 800 | |
| }, | |
| { | |
| "epoch": 0.35310344827586204, | |
| "grad_norm": 0.148575097322464, | |
| "learning_rate": 9.823469895169365e-05, | |
| "loss": 0.9159, | |
| "step": 1600 | |
| }, | |
| { | |
| "epoch": 0.5296551724137931, | |
| "grad_norm": 0.21376433968544006, | |
| "learning_rate": 9.19696754273079e-05, | |
| "loss": 0.9125, | |
| "step": 2400 | |
| }, | |
| { | |
| "epoch": 0.7062068965517241, | |
| "grad_norm": 0.09860826283693314, | |
| "learning_rate": 8.175175096510351e-05, | |
| "loss": 0.9134, | |
| "step": 3200 | |
| }, | |
| { | |
| "epoch": 0.8827586206896552, | |
| "grad_norm": 0.11440066993236542, | |
| "learning_rate": 6.854329762962416e-05, | |
| "loss": 0.9108, | |
| "step": 4000 | |
| }, | |
| { | |
| "epoch": 0.8827586206896552, | |
| "eval_loss": 0.9154898524284363, | |
| "eval_runtime": 247.4123, | |
| "eval_samples_per_second": 121.255, | |
| "eval_steps_per_second": 7.578, | |
| "step": 4000 | |
| }, | |
| { | |
| "epoch": 1.059144827586207, | |
| "grad_norm": 0.10314279049634933, | |
| "learning_rate": 5.358834952514551e-05, | |
| "loss": 0.9084, | |
| "step": 4800 | |
| }, | |
| { | |
| "epoch": 1.2356965517241378, | |
| "grad_norm": 0.15208840370178223, | |
| "learning_rate": 3.8295433827190085e-05, | |
| "loss": 0.9046, | |
| "step": 5600 | |
| }, | |
| { | |
| "epoch": 1.412248275862069, | |
| "grad_norm": 0.10573920607566833, | |
| "learning_rate": 2.4104909084852035e-05, | |
| "loss": 0.9043, | |
| "step": 6400 | |
| }, | |
| { | |
| "epoch": 1.5888, | |
| "grad_norm": 0.2402600795030594, | |
| "learning_rate": 1.2353305495017958e-05, | |
| "loss": 0.9047, | |
| "step": 7200 | |
| }, | |
| { | |
| "epoch": 1.765351724137931, | |
| "grad_norm": 0.10216963291168213, | |
| "learning_rate": 4.147444217922592e-06, | |
| "loss": 0.904, | |
| "step": 8000 | |
| }, | |
| { | |
| "epoch": 1.765351724137931, | |
| "eval_loss": 0.9144690036773682, | |
| "eval_runtime": 247.1254, | |
| "eval_samples_per_second": 121.396, | |
| "eval_steps_per_second": 7.587, | |
| "step": 8000 | |
| }, | |
| { | |
| "epoch": 1.9419034482758621, | |
| "grad_norm": 0.17538346350193024, | |
| "learning_rate": 2.6019176748554587e-07, | |
| "loss": 0.9044, | |
| "step": 8800 | |
| }, | |
| { | |
| "epoch": 2.0, | |
| "step": 9064, | |
| "total_flos": 1.2106519982783857e+19, | |
| "train_loss": 0.9370549143886313, | |
| "train_runtime": 28045.4399, | |
| "train_samples_per_second": 41.361, | |
| "train_steps_per_second": 0.323 | |
| } | |
| ], | |
| "logging_steps": 800, | |
| "max_steps": 9064, | |
| "num_input_tokens_seen": 0, | |
| "num_train_epochs": 2, | |
| "save_steps": 4000, | |
| "stateful_callbacks": { | |
| "TrainerControl": { | |
| "args": { | |
| "should_epoch_stop": false, | |
| "should_evaluate": false, | |
| "should_log": false, | |
| "should_save": true, | |
| "should_training_stop": true | |
| }, | |
| "attributes": {} | |
| } | |
| }, | |
| "total_flos": 1.2106519982783857e+19, | |
| "train_batch_size": 4, | |
| "trial_name": null, | |
| "trial_params": null | |
| } | |