Text Generation
Transformers
Safetensors
English
qwen2
text-generation-inference
unsloth
conversational
Instructions to use ubetu/Qwen2.5-Coder-0.5B-Instruct-code-lora-seed0 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ubetu/Qwen2.5-Coder-0.5B-Instruct-code-lora-seed0 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="ubetu/Qwen2.5-Coder-0.5B-Instruct-code-lora-seed0") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("ubetu/Qwen2.5-Coder-0.5B-Instruct-code-lora-seed0") model = AutoModelForCausalLM.from_pretrained("ubetu/Qwen2.5-Coder-0.5B-Instruct-code-lora-seed0", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use ubetu/Qwen2.5-Coder-0.5B-Instruct-code-lora-seed0 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ubetu/Qwen2.5-Coder-0.5B-Instruct-code-lora-seed0" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ubetu/Qwen2.5-Coder-0.5B-Instruct-code-lora-seed0", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/ubetu/Qwen2.5-Coder-0.5B-Instruct-code-lora-seed0
- SGLang
How to use ubetu/Qwen2.5-Coder-0.5B-Instruct-code-lora-seed0 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 "ubetu/Qwen2.5-Coder-0.5B-Instruct-code-lora-seed0" \ --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": "ubetu/Qwen2.5-Coder-0.5B-Instruct-code-lora-seed0", "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 "ubetu/Qwen2.5-Coder-0.5B-Instruct-code-lora-seed0" \ --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": "ubetu/Qwen2.5-Coder-0.5B-Instruct-code-lora-seed0", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Unsloth Studio
How to use ubetu/Qwen2.5-Coder-0.5B-Instruct-code-lora-seed0 with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for ubetu/Qwen2.5-Coder-0.5B-Instruct-code-lora-seed0 to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for ubetu/Qwen2.5-Coder-0.5B-Instruct-code-lora-seed0 to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for ubetu/Qwen2.5-Coder-0.5B-Instruct-code-lora-seed0 to start chatting
Load model with FastModel
pip install unsloth from unsloth import FastModel model, tokenizer = FastModel.from_pretrained( model_name="ubetu/Qwen2.5-Coder-0.5B-Instruct-code-lora-seed0", max_seq_length=2048, ) - Docker Model Runner
How to use ubetu/Qwen2.5-Coder-0.5B-Instruct-code-lora-seed0 with Docker Model Runner:
docker model run hf.co/ubetu/Qwen2.5-Coder-0.5B-Instruct-code-lora-seed0
| loss,grad_norm,learning_rate,epoch,step,train_runtime,train_samples_per_second,train_steps_per_second,total_flos,train_loss | |
| 0.6262,0.1733129620552063,0.00019,0.050505050505050504,20,,,,, | |
| 0.5476,0.08093126118183136,0.00019874255503213152,0.10101010101010101,40,,,,, | |
| 0.5033,0.08490929752588272,0.0001947376831715892,0.15151515151515152,60,,,,, | |
| 0.5047,0.0910632386803627,0.00018809346758274012,0.20202020202020202,80,,,,, | |
| 0.4979,0.09581230580806732,0.0001789950127367606,0.25252525252525254,100,,,,, | |
| 0.4942,0.09885909408330917,0.00016769579696382597,0.30303030303030304,120,,,,, | |
| 0.4932,0.09994969516992569,0.000154510610675594,0.35353535353535354,140,,,,, | |
| 0.4902,0.09873974323272705,0.0001398067864642431,0.40404040404040403,160,,,,, | |
| 0.4863,0.10524720698595047,0.00012399396540305205,0.45454545454545453,180,,,,, | |
| 0.4748,0.1007479727268219,0.00010751268465418785,0.5050505050505051,200,,,,, | |
| 0.4808,0.09715110808610916,9.082210432715197e-05,0.5555555555555556,220,,,,, | |
| 0.4821,0.10728275775909424,7.438721551137367e-05,0.6060606060606061,240,,,,, | |
| 0.4844,0.11552736908197403,5.866588586066481e-05,0.6565656565656566,260,,,,, | |
| 0.4812,0.10522180050611496,4.409610363297211e-05,0.7070707070707071,280,,,,, | |
| 0.484,0.10800069570541382,3.108377556000037e-05,0.7575757575757576,300,,,,, | |
| 0.4779,0.10630737990140915,1.999141849185938e-05,0.8080808080808081,320,,,,, | |
| 0.4786,0.1103220134973526,1.11280598617714e-05,0.8585858585858586,340,,,,, | |
| 0.48,0.10225826501846313,4.740628338761255e-06,0.9090909090909091,360,,,,, | |
| 0.4753,0.10074862837791443,1.0070745203721532e-06,0.9595959595959596,380,,,,, | |
| ,,,1.0,396,758.3116,66.69,0.522,9.241770786768384e+16,0.49630829661783543 | |