Instructions to use pierretokns/qwen-0.5b-ccmcp-v2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use pierretokns/qwen-0.5b-ccmcp-v2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="pierretokns/qwen-0.5b-ccmcp-v2")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("pierretokns/qwen-0.5b-ccmcp-v2", device_map="auto") - MLX
How to use pierretokns/qwen-0.5b-ccmcp-v2 with MLX:
# Make sure mlx-lm is installed # pip install --upgrade mlx-lm # if on a CUDA device, also pip install mlx[cuda] # Generate text with mlx-lm from mlx_lm import load, generate model, tokenizer = load("pierretokns/qwen-0.5b-ccmcp-v2") prompt = "Once upon a time in" text = generate(model, tokenizer, prompt=prompt, verbose=True) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- vLLM
How to use pierretokns/qwen-0.5b-ccmcp-v2 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "pierretokns/qwen-0.5b-ccmcp-v2" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "pierretokns/qwen-0.5b-ccmcp-v2", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/pierretokns/qwen-0.5b-ccmcp-v2
- SGLang
How to use pierretokns/qwen-0.5b-ccmcp-v2 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 "pierretokns/qwen-0.5b-ccmcp-v2" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "pierretokns/qwen-0.5b-ccmcp-v2", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'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 "pierretokns/qwen-0.5b-ccmcp-v2" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "pierretokns/qwen-0.5b-ccmcp-v2", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - MLX LM
How to use pierretokns/qwen-0.5b-ccmcp-v2 with MLX LM:
Generate or start a chat session
# Install MLX LM uv tool install mlx-lm # Generate some text mlx_lm.generate --model "pierretokns/qwen-0.5b-ccmcp-v2" --prompt "Once upon a time"
- Docker Model Runner
How to use pierretokns/qwen-0.5b-ccmcp-v2 with Docker Model Runner:
docker model run hf.co/pierretokns/qwen-0.5b-ccmcp-v2
Upload adapter_config.json with huggingface_hub
Browse files- adapter_config.json +40 -0
adapter_config.json
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"adapter_path": "models/qwen-0.5b-ccmcp-v2-lora",
|
| 3 |
+
"batch_size": 1,
|
| 4 |
+
"config": null,
|
| 5 |
+
"data": "data/mcp_training_text",
|
| 6 |
+
"fine_tune_type": "lora",
|
| 7 |
+
"grad_accumulation_steps": 1,
|
| 8 |
+
"grad_checkpoint": true,
|
| 9 |
+
"iters": 2000,
|
| 10 |
+
"learning_rate": 5e-05,
|
| 11 |
+
"lora_parameters": {
|
| 12 |
+
"rank": 8,
|
| 13 |
+
"dropout": 0.0,
|
| 14 |
+
"scale": 20.0
|
| 15 |
+
},
|
| 16 |
+
"lr_schedule": null,
|
| 17 |
+
"mask_prompt": false,
|
| 18 |
+
"max_seq_length": 2048,
|
| 19 |
+
"model": "mlx-community/Qwen2.5-Coder-0.5B-Instruct-4bit",
|
| 20 |
+
"num_layers": 16,
|
| 21 |
+
"optimizer": "adam",
|
| 22 |
+
"optimizer_config": {
|
| 23 |
+
"adam": {},
|
| 24 |
+
"adamw": {},
|
| 25 |
+
"muon": {},
|
| 26 |
+
"sgd": {},
|
| 27 |
+
"adafactor": {}
|
| 28 |
+
},
|
| 29 |
+
"project_name": null,
|
| 30 |
+
"report_to": null,
|
| 31 |
+
"resume_adapter_file": null,
|
| 32 |
+
"save_every": 500,
|
| 33 |
+
"seed": 0,
|
| 34 |
+
"steps_per_eval": 200,
|
| 35 |
+
"steps_per_report": 100,
|
| 36 |
+
"test": false,
|
| 37 |
+
"test_batches": 500,
|
| 38 |
+
"train": true,
|
| 39 |
+
"val_batches": 25
|
| 40 |
+
}
|