Instructions to use code-world/Qwen2.5-1.5B-Instruct-lora-ft with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use code-world/Qwen2.5-1.5B-Instruct-lora-ft with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen2.5-1.5B-Instruct") model = PeftModel.from_pretrained(base_model, "code-world/Qwen2.5-1.5B-Instruct-lora-ft") - Transformers
How to use code-world/Qwen2.5-1.5B-Instruct-lora-ft with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="code-world/Qwen2.5-1.5B-Instruct-lora-ft") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("code-world/Qwen2.5-1.5B-Instruct-lora-ft", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use code-world/Qwen2.5-1.5B-Instruct-lora-ft with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "code-world/Qwen2.5-1.5B-Instruct-lora-ft" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "code-world/Qwen2.5-1.5B-Instruct-lora-ft", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/code-world/Qwen2.5-1.5B-Instruct-lora-ft
- SGLang
How to use code-world/Qwen2.5-1.5B-Instruct-lora-ft 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 "code-world/Qwen2.5-1.5B-Instruct-lora-ft" \ --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": "code-world/Qwen2.5-1.5B-Instruct-lora-ft", "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 "code-world/Qwen2.5-1.5B-Instruct-lora-ft" \ --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": "code-world/Qwen2.5-1.5B-Instruct-lora-ft", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use code-world/Qwen2.5-1.5B-Instruct-lora-ft with Docker Model Runner:
docker model run hf.co/code-world/Qwen2.5-1.5B-Instruct-lora-ft
Ctrl+K
- checkpoint-1000
- checkpoint-1200
- checkpoint-1400
- checkpoint-1600
- checkpoint-1800
- checkpoint-200
- checkpoint-2000
- checkpoint-2200
- checkpoint-2400
- checkpoint-2600
- checkpoint-2800
- checkpoint-3000
- checkpoint-3024
- checkpoint-400
- checkpoint-600
- checkpoint-800
- 2.64 kB
- 5.21 kB
- 859 Bytes
- 8.75 MB xet
- 605 Bytes
- 2.51 kB
- 1.67 MB
- 613 Bytes
- 11.4 MB xet
- 4.69 kB
- 2.78 MB