Text Generation
Transformers
Safetensors
English
Chinese
qwen3_5_moe
image-text-to-text
code
agent
agentic-coding
Mixture of Experts
coding
conversational
Instructions to use SpectreSystems/KAT-Coder-V2.5-Dev-MTP with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use SpectreSystems/KAT-Coder-V2.5-Dev-MTP with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="SpectreSystems/KAT-Coder-V2.5-Dev-MTP") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("SpectreSystems/KAT-Coder-V2.5-Dev-MTP") model = AutoModelForMultimodalLM.from_pretrained("SpectreSystems/KAT-Coder-V2.5-Dev-MTP", device_map="auto") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] inputs = processor.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=256) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use SpectreSystems/KAT-Coder-V2.5-Dev-MTP with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "SpectreSystems/KAT-Coder-V2.5-Dev-MTP" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "SpectreSystems/KAT-Coder-V2.5-Dev-MTP", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/SpectreSystems/KAT-Coder-V2.5-Dev-MTP
- SGLang
How to use SpectreSystems/KAT-Coder-V2.5-Dev-MTP 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 "SpectreSystems/KAT-Coder-V2.5-Dev-MTP" \ --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": "SpectreSystems/KAT-Coder-V2.5-Dev-MTP", "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 "SpectreSystems/KAT-Coder-V2.5-Dev-MTP" \ --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": "SpectreSystems/KAT-Coder-V2.5-Dev-MTP", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use SpectreSystems/KAT-Coder-V2.5-Dev-MTP with Docker Model Runner:
docker model run hf.co/SpectreSystems/KAT-Coder-V2.5-Dev-MTP
Upload MTP files
Browse files- config.json +1 -1
- model-00014-of-mtp.safetensors +3 -0
- model.safetensors.index.json +21 -2
config.json
CHANGED
|
@@ -67,7 +67,7 @@
|
|
| 67 |
"max_position_embeddings": 262144,
|
| 68 |
"model_type": "qwen3_5_moe_text",
|
| 69 |
"moe_intermediate_size": 512,
|
| 70 |
-
"mtp_num_hidden_layers":
|
| 71 |
"mtp_use_dedicated_embeddings": false,
|
| 72 |
"num_attention_heads": 16,
|
| 73 |
"num_experts": 256,
|
|
|
|
| 67 |
"max_position_embeddings": 262144,
|
| 68 |
"model_type": "qwen3_5_moe_text",
|
| 69 |
"moe_intermediate_size": 512,
|
| 70 |
+
"mtp_num_hidden_layers": 1,
|
| 71 |
"mtp_use_dedicated_embeddings": false,
|
| 72 |
"num_attention_heads": 16,
|
| 73 |
"num_experts": 256,
|
model-00014-of-mtp.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:62e6f4b910fd5ff7594e85863fe28cfd0177890c8251655ee9bcbc35a208d78b
|
| 3 |
+
size 1689283688
|
model.safetensors.index.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
{
|
| 2 |
"metadata": {
|
| 3 |
-
"total_size":
|
| 4 |
},
|
| 5 |
"weight_map": {
|
| 6 |
"model.language_model.embed_tokens.weight": "model-00000-of-00013.safetensors",
|
|
@@ -31335,6 +31335,25 @@
|
|
| 31335 |
"model.language_model.layers.33.linear_attn.in_proj_b.weight": "model-00012-of-00013.safetensors",
|
| 31336 |
"model.language_model.layers.37.linear_attn.in_proj_b.weight": "model-00012-of-00013.safetensors",
|
| 31337 |
"model.language_model.layers.38.linear_attn.dt_bias": "model-00012-of-00013.safetensors",
|
| 31338 |
-
"model.language_model.layers.38.mlp.shared_expert_gate.weight": "model-00012-of-00013.safetensors"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 31339 |
}
|
| 31340 |
}
|
|
|
|
| 1 |
{
|
| 2 |
"metadata": {
|
| 3 |
+
"total_size": 71010502912
|
| 4 |
},
|
| 5 |
"weight_map": {
|
| 6 |
"model.language_model.embed_tokens.weight": "model-00000-of-00013.safetensors",
|
|
|
|
| 31335 |
"model.language_model.layers.33.linear_attn.in_proj_b.weight": "model-00012-of-00013.safetensors",
|
| 31336 |
"model.language_model.layers.37.linear_attn.in_proj_b.weight": "model-00012-of-00013.safetensors",
|
| 31337 |
"model.language_model.layers.38.linear_attn.dt_bias": "model-00012-of-00013.safetensors",
|
| 31338 |
+
"model.language_model.layers.38.mlp.shared_expert_gate.weight": "model-00012-of-00013.safetensors",
|
| 31339 |
+
"mtp.fc.weight": "model-00014-of-mtp.safetensors",
|
| 31340 |
+
"mtp.norm.weight": "model-00014-of-mtp.safetensors",
|
| 31341 |
+
"mtp.pre_fc_norm_embedding.weight": "model-00014-of-mtp.safetensors",
|
| 31342 |
+
"mtp.pre_fc_norm_hidden.weight": "model-00014-of-mtp.safetensors",
|
| 31343 |
+
"mtp.layers.0.input_layernorm.weight": "model-00014-of-mtp.safetensors",
|
| 31344 |
+
"mtp.layers.0.post_attention_layernorm.weight": "model-00014-of-mtp.safetensors",
|
| 31345 |
+
"mtp.layers.0.self_attn.q_proj.weight": "model-00014-of-mtp.safetensors",
|
| 31346 |
+
"mtp.layers.0.self_attn.k_proj.weight": "model-00014-of-mtp.safetensors",
|
| 31347 |
+
"mtp.layers.0.self_attn.v_proj.weight": "model-00014-of-mtp.safetensors",
|
| 31348 |
+
"mtp.layers.0.self_attn.o_proj.weight": "model-00014-of-mtp.safetensors",
|
| 31349 |
+
"mtp.layers.0.self_attn.q_norm.weight": "model-00014-of-mtp.safetensors",
|
| 31350 |
+
"mtp.layers.0.self_attn.k_norm.weight": "model-00014-of-mtp.safetensors",
|
| 31351 |
+
"mtp.layers.0.mlp.gate.weight": "model-00014-of-mtp.safetensors",
|
| 31352 |
+
"mtp.layers.0.mlp.experts.gate_up_proj": "model-00014-of-mtp.safetensors",
|
| 31353 |
+
"mtp.layers.0.mlp.experts.down_proj": "model-00014-of-mtp.safetensors",
|
| 31354 |
+
"mtp.layers.0.mlp.shared_expert.gate_proj.weight": "model-00014-of-mtp.safetensors",
|
| 31355 |
+
"mtp.layers.0.mlp.shared_expert.up_proj.weight": "model-00014-of-mtp.safetensors",
|
| 31356 |
+
"mtp.layers.0.mlp.shared_expert.down_proj.weight": "model-00014-of-mtp.safetensors",
|
| 31357 |
+
"mtp.layers.0.mlp.shared_expert_gate.weight": "model-00014-of-mtp.safetensors"
|
| 31358 |
}
|
| 31359 |
}
|