Instructions to use cmndcntrlcyber/qwen14b-code-trainer-v9_mixed with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use cmndcntrlcyber/qwen14b-code-trainer-v9_mixed with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen2.5-Coder-14B-Instruct") model = PeftModel.from_pretrained(base_model, "cmndcntrlcyber/qwen14b-code-trainer-v9_mixed") - Transformers
How to use cmndcntrlcyber/qwen14b-code-trainer-v9_mixed with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="cmndcntrlcyber/qwen14b-code-trainer-v9_mixed") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("cmndcntrlcyber/qwen14b-code-trainer-v9_mixed", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use cmndcntrlcyber/qwen14b-code-trainer-v9_mixed with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "cmndcntrlcyber/qwen14b-code-trainer-v9_mixed" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "cmndcntrlcyber/qwen14b-code-trainer-v9_mixed", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/cmndcntrlcyber/qwen14b-code-trainer-v9_mixed
- SGLang
How to use cmndcntrlcyber/qwen14b-code-trainer-v9_mixed 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 "cmndcntrlcyber/qwen14b-code-trainer-v9_mixed" \ --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": "cmndcntrlcyber/qwen14b-code-trainer-v9_mixed", "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 "cmndcntrlcyber/qwen14b-code-trainer-v9_mixed" \ --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": "cmndcntrlcyber/qwen14b-code-trainer-v9_mixed", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use cmndcntrlcyber/qwen14b-code-trainer-v9_mixed with Docker Model Runner:
docker model run hf.co/cmndcntrlcyber/qwen14b-code-trainer-v9_mixed
| { | |
| "model": "Qwen/Qwen2.5-Coder-14B-Instruct", | |
| "adapter": "cmndcntrlcyber/qwen14b-code-trainer-v9_mixed", | |
| "eval_type": "nexus-aligned", | |
| "scenarios": 5, | |
| "progressing": 5, | |
| "progress_rate": 1.0, | |
| "target_threshold": 3, | |
| "meets_target": true, | |
| "tools_tested": [ | |
| "Read", | |
| "Write", | |
| "Edit", | |
| "LS", | |
| "Bash", | |
| "Grep", | |
| "Glob" | |
| ], | |
| "results": [ | |
| { | |
| "scenario": "read_and_analyze", | |
| "description": "Read a file and explain what it does", | |
| "making_progress": true, | |
| "used_tools": true, | |
| "gave_explanation": true, | |
| "not_refusing": true, | |
| "not_looping": true, | |
| "reason": "used tools; gave explanation", | |
| "n_turns": 5 | |
| }, | |
| { | |
| "scenario": "find_and_fix_bug", | |
| "description": "Find a bug in code and propose a fix", | |
| "making_progress": true, | |
| "used_tools": true, | |
| "gave_explanation": true, | |
| "not_refusing": true, | |
| "not_looping": true, | |
| "reason": "used tools; gave explanation", | |
| "n_turns": 5 | |
| }, | |
| { | |
| "scenario": "multi_file_investigation", | |
| "description": "Investigate across multiple files", | |
| "making_progress": true, | |
| "used_tools": true, | |
| "gave_explanation": true, | |
| "not_refusing": true, | |
| "not_looping": true, | |
| "reason": "used tools; gave explanation", | |
| "n_turns": 5 | |
| }, | |
| { | |
| "scenario": "write_new_code", | |
| "description": "Write a new function based on requirements", | |
| "making_progress": true, | |
| "used_tools": true, | |
| "gave_explanation": true, | |
| "not_refusing": true, | |
| "not_looping": true, | |
| "reason": "used tools; gave explanation", | |
| "n_turns": 3 | |
| }, | |
| { | |
| "scenario": "run_and_debug", | |
| "description": "Run a command and interpret the output", | |
| "making_progress": true, | |
| "used_tools": true, | |
| "gave_explanation": true, | |
| "not_refusing": true, | |
| "not_looping": true, | |
| "reason": "used tools; gave explanation", | |
| "n_turns": 5 | |
| } | |
| ] | |
| } |