Text Generation
Transformers
Safetensors
deepseek_v3
llm-compressor
tiny-model
mtp
pr-3225
test-fixture
conversational
custom_code
text-generation-inference
Instructions to use inference-optimization/DeepSeek-V3-0.86B-MTP with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use inference-optimization/DeepSeek-V3-0.86B-MTP with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="inference-optimization/DeepSeek-V3-0.86B-MTP", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("inference-optimization/DeepSeek-V3-0.86B-MTP", trust_remote_code=True) model = AutoModelForCausalLM.from_pretrained("inference-optimization/DeepSeek-V3-0.86B-MTP", trust_remote_code=True, 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=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use inference-optimization/DeepSeek-V3-0.86B-MTP with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "inference-optimization/DeepSeek-V3-0.86B-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": "inference-optimization/DeepSeek-V3-0.86B-MTP", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/inference-optimization/DeepSeek-V3-0.86B-MTP
- SGLang
How to use inference-optimization/DeepSeek-V3-0.86B-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 "inference-optimization/DeepSeek-V3-0.86B-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": "inference-optimization/DeepSeek-V3-0.86B-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 "inference-optimization/DeepSeek-V3-0.86B-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": "inference-optimization/DeepSeek-V3-0.86B-MTP", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use inference-optimization/DeepSeek-V3-0.86B-MTP with Docker Model Runner:
docker model run hf.co/inference-optimization/DeepSeek-V3-0.86B-MTP
Download validation.json from inference-optimization/DeepSeek-V3-0.86B-MTP: direct link, hf CLI and curl.
- Browser
- Download file 11 kB
-
https://huggingface.co/inference-optimization/DeepSeek-V3-0.86B-MTP/resolve/main/validation.json
- Command line
-
hf download hf://inference-optimization/DeepSeek-V3-0.86B-MTP/validation.json
-
curl -L -o validation.json https://huggingface.co/inference-optimization/DeepSeek-V3-0.86B-MTP/resolve/main/validation.json
11 kB
| { | |
| "llm_compressor_commit": "2d5242056a8a00028686a303771ffc8e2fe27d07", | |
| "compressed_tensors_commit": "e69c8dc58aa152e5f5e36e85800ec1d2e7de5271", | |
| "transformers": "5.17.0", | |
| "torch": "2.14.0+cu130", | |
| "vllm": "0.30.0", | |
| "base_architecture": "deepseek-ai/DeepSeek-V3-Base", | |
| "base_revision": "afb92e1fa402c2be2a9eb085312bb02e0384d6c7", | |
| "fixture": "deepseek-v3-native-depth", | |
| "variant": "source", | |
| "parameter_counts": { | |
| "architecture": "DeepseekV3ForCausalLM", | |
| "backbone_parameters": 849041408, | |
| "mtp_parameters": 11889152, | |
| "total_parameters": 860930560, | |
| "native_depth": true, | |
| "model_patches": false, | |
| "changes": { | |
| "hidden_size": { | |
| "original": 7168, | |
| "tiny": 768 | |
| }, | |
| "intermediate_size": { | |
| "original": 18432, | |
| "tiny": 3072 | |
| }, | |
| "moe_intermediate_size": { | |
| "original": 2048, | |
| "tiny": 384 | |
| }, | |
| "num_attention_heads": { | |
| "original": 128, | |
| "tiny": 8 | |
| }, | |
| "num_key_value_heads": { | |
| "original": 128, | |
| "tiny": 8 | |
| }, | |
| "n_routed_experts": { | |
| "original": 256, | |
| "tiny": 8 | |
| }, | |
| "kv_lora_rank": { | |
| "original": 512, | |
| "tiny": 256 | |
| }, | |
| "q_lora_rank": { | |
| "original": 1536, | |
| "tiny": 512 | |
| }, | |
| "n_group": { | |
| "original": 8, | |
| "tiny": 4 | |
| }, | |
| "num_experts_per_tok": { | |
| "original": 8, | |
| "tiny": 4 | |
| } | |
| } | |
| }, | |
| "backbone_validation": { | |
| "name": "deepseek-v3-native-depth", | |
| "passed": true, | |
| "reloaded_perplexity": 1.768900205933661, | |
| "model_patches": false, | |
| "backbone_parameters": 849041408, | |
| "backbone_activated_parameters_estimate": 643782656, | |
| "generation": "The capital of France is Paris. Paris is the largest city in France and serves as the country's political" | |
| }, | |
| "mtp_training": "synthetic initialized projections with trained final decoder block copied; not separately trained", | |
| "training": { | |
| "seed": 3225, | |
| "initialization": "random", | |
| "optimizer": "AdamW", | |
| "learning_rate": 0.0004, | |
| "weight_decay": 0.01, | |
| "batch_size": 2, | |
| "max_sequence_length": 160, | |
| "evaluation": "same toy corpus as training" | |
| }, | |
| "quantization-results": { | |
| "name": "deepseek-v3-native-depth", | |
| "world_size": 2, | |
| "mtp_fp8_layers": 32, | |
| "source": "fixtures/deepseek-v3-native-depth/source", | |
| "quantized": "fixtures/deepseek-v3-native-depth/fp8" | |
| }, | |
| "vllm-source-results": { | |
| "name": "deepseek-v3-native-depth", | |
| "mode": "source", | |
| "llm_args": { | |
| "model": "fixtures/deepseek-v3-native-depth/source", | |
| "dtype": "bfloat16", | |
| "tensor_parallel_size": 1, | |
| "gpu_memory_utilization": 0.25, | |
| "max_model_len": 256, | |
| "max_num_seqs": 4, | |
| "enforce_eager": true, | |
| "enable_prefix_caching": false, | |
| "seed": 3225, | |
| "disable_log_stats": false | |
| }, | |
| "generations": [ | |
| { | |
| "prompt": "The capital of France is", | |
| "text": " Paris. Paris is the largest city in France and serves as the country's political", | |
| "token_ids": [ | |
| 11111, | |
| 16, | |
| 11111, | |
| 344, | |
| 270, | |
| 9152, | |
| 4593, | |
| 295, | |
| 8760, | |
| 305, | |
| 14455, | |
| 412, | |
| 270, | |
| 3924, | |
| 734, | |
| 5218 | |
| ], | |
| "cumulative_logprob": -0.4147992846556008, | |
| "toy_keyword_match": true | |
| }, | |
| { | |
| "prompt": "The creator of the theory of relativity was Albert", | |
| "text": " Einstein. Einstein developed the special theory of relativity in 1905 and the general", | |
| "token_ids": [ | |
| 43490, | |
| 16, | |
| 43490, | |
| 5873, | |
| 270, | |
| 3953, | |
| 6129, | |
| 294, | |
| 76407, | |
| 295, | |
| 223, | |
| 5151, | |
| 23, | |
| 305, | |
| 270, | |
| 3810 | |
| ], | |
| "cumulative_logprob": -0.36012316565029323, | |
| "toy_keyword_match": true | |
| }, | |
| { | |
| "prompt": "The classic game is called rock, paper,", | |
| "text": " scissors. Rock beats scissors, scissors beats paper, and paper beats rock..", | |
| "token_ids": [ | |
| 78167, | |
| 16, | |
| 13774, | |
| 45007, | |
| 78167, | |
| 14, | |
| 78167, | |
| 45007, | |
| 4468, | |
| 14, | |
| 305, | |
| 4468, | |
| 45007, | |
| 8630, | |
| 16, | |
| 16 | |
| ], | |
| "cumulative_logprob": -0.5266634803265333, | |
| "toy_keyword_match": true | |
| }, | |
| { | |
| "prompt": "Actions speak louder than", | |
| "text": " words. What you do matters more than what you say. What you say do", | |
| "token_ids": [ | |
| 3345, | |
| 16, | |
| 1999, | |
| 440, | |
| 696, | |
| 13287, | |
| 850, | |
| 1099, | |
| 1205, | |
| 440, | |
| 2507, | |
| 16, | |
| 1999, | |
| 440, | |
| 2507, | |
| 696 | |
| ], | |
| "cumulative_logprob": -4.043866187334061, | |
| "toy_keyword_match": true | |
| } | |
| ], | |
| "speculative_metrics": [], | |
| "passed": true | |
| }, | |
| "vllm-fp8-results": { | |
| "name": "deepseek-v3-native-depth", | |
| "mode": "fp8", | |
| "llm_args": { | |
| "model": "fixtures/deepseek-v3-native-depth/fp8", | |
| "dtype": "bfloat16", | |
| "tensor_parallel_size": 1, | |
| "gpu_memory_utilization": 0.25, | |
| "max_model_len": 256, | |
| "max_num_seqs": 4, | |
| "enforce_eager": true, | |
| "enable_prefix_caching": false, | |
| "seed": 3225, | |
| "disable_log_stats": false | |
| }, | |
| "generations": [ | |
| { | |
| "prompt": "The capital of France is", | |
| "text": " Paris. Paris is the largest city in France and serves as the country's political", | |
| "token_ids": [ | |
| 11111, | |
| 16, | |
| 11111, | |
| 344, | |
| 270, | |
| 9152, | |
| 4593, | |
| 295, | |
| 8760, | |
| 305, | |
| 14455, | |
| 412, | |
| 270, | |
| 3924, | |
| 734, | |
| 5218 | |
| ], | |
| "cumulative_logprob": -0.4252015920355916, | |
| "toy_keyword_match": true | |
| }, | |
| { | |
| "prompt": "The creator of the theory of relativity was Albert", | |
| "text": " Einstein. Einstein developed the special theory of relativity in 1905 and the general", | |
| "token_ids": [ | |
| 43490, | |
| 16, | |
| 43490, | |
| 5873, | |
| 270, | |
| 3953, | |
| 6129, | |
| 294, | |
| 76407, | |
| 295, | |
| 223, | |
| 5151, | |
| 23, | |
| 305, | |
| 270, | |
| 3810 | |
| ], | |
| "cumulative_logprob": -0.3590544555336237, | |
| "toy_keyword_match": true | |
| }, | |
| { | |
| "prompt": "The classic game is called rock, paper,", | |
| "text": " scissors. Rock beats scissors, scissors beats paper, and paper beats rock..", | |
| "token_ids": [ | |
| 78167, | |
| 16, | |
| 13774, | |
| 45007, | |
| 78167, | |
| 14, | |
| 78167, | |
| 45007, | |
| 4468, | |
| 14, | |
| 305, | |
| 4468, | |
| 45007, | |
| 8630, | |
| 16, | |
| 16 | |
| ], | |
| "cumulative_logprob": -0.5405170866288245, | |
| "toy_keyword_match": true | |
| }, | |
| { | |
| "prompt": "Actions speak louder than", | |
| "text": " words. What you do matters more than what you say. What you say do", | |
| "token_ids": [ | |
| 3345, | |
| 16, | |
| 1999, | |
| 440, | |
| 696, | |
| 13287, | |
| 850, | |
| 1099, | |
| 1205, | |
| 440, | |
| 2507, | |
| 16, | |
| 1999, | |
| 440, | |
| 2507, | |
| 696 | |
| ], | |
| "cumulative_logprob": -4.058406139723957, | |
| "toy_keyword_match": true | |
| } | |
| ], | |
| "speculative_metrics": [], | |
| "passed": true | |
| }, | |
| "vllm-mtp-results": { | |
| "name": "deepseek-v3-native-depth", | |
| "mode": "mtp", | |
| "llm_args": { | |
| "model": "fixtures/deepseek-v3-native-depth/fp8", | |
| "dtype": "bfloat16", | |
| "tensor_parallel_size": 1, | |
| "gpu_memory_utilization": 0.25, | |
| "max_model_len": 256, | |
| "max_num_seqs": 4, | |
| "enforce_eager": true, | |
| "enable_prefix_caching": false, | |
| "seed": 3225, | |
| "disable_log_stats": false, | |
| "speculative_config": { | |
| "method": "mtp", | |
| "num_speculative_tokens": 1 | |
| } | |
| }, | |
| "generations": [ | |
| { | |
| "prompt": "The capital of France is", | |
| "text": " Paris. Paris is the largest city in France and serves as the country's political", | |
| "token_ids": [ | |
| 11111, | |
| 16, | |
| 11111, | |
| 344, | |
| 270, | |
| 9152, | |
| 4593, | |
| 295, | |
| 8760, | |
| 305, | |
| 14455, | |
| 412, | |
| 270, | |
| 3924, | |
| 734, | |
| 5218 | |
| ], | |
| "cumulative_logprob": -0.4252015920355916, | |
| "toy_keyword_match": true | |
| }, | |
| { | |
| "prompt": "The creator of the theory of relativity was Albert", | |
| "text": " Einstein. Einstein developed the special theory of relativity in 1905 and the general", | |
| "token_ids": [ | |
| 43490, | |
| 16, | |
| 43490, | |
| 5873, | |
| 270, | |
| 3953, | |
| 6129, | |
| 294, | |
| 76407, | |
| 295, | |
| 223, | |
| 5151, | |
| 23, | |
| 305, | |
| 270, | |
| 3810 | |
| ], | |
| "cumulative_logprob": -0.3590544555336237, | |
| "toy_keyword_match": true | |
| }, | |
| { | |
| "prompt": "The classic game is called rock, paper,", | |
| "text": " scissors. Rock beats scissors, scissors beats paper, and paper beats rock..", | |
| "token_ids": [ | |
| 78167, | |
| 16, | |
| 13774, | |
| 45007, | |
| 78167, | |
| 14, | |
| 78167, | |
| 45007, | |
| 4468, | |
| 14, | |
| 305, | |
| 4468, | |
| 45007, | |
| 8630, | |
| 16, | |
| 16 | |
| ], | |
| "cumulative_logprob": -0.5405170866288245, | |
| "toy_keyword_match": true | |
| }, | |
| { | |
| "prompt": "Actions speak louder than", | |
| "text": " words. What you do matters more than what you say. What you say do", | |
| "token_ids": [ | |
| 3345, | |
| 16, | |
| 1999, | |
| 440, | |
| 696, | |
| 13287, | |
| 850, | |
| 1099, | |
| 1205, | |
| 440, | |
| 2507, | |
| 16, | |
| 1999, | |
| 440, | |
| 2507, | |
| 696 | |
| ], | |
| "cumulative_logprob": -4.058406139723957, | |
| "toy_keyword_match": true | |
| } | |
| ], | |
| "speculative_metrics": [ | |
| { | |
| "name": "vllm:spec_decode_num_drafts", | |
| "value": 60 | |
| }, | |
| { | |
| "name": "vllm:spec_decode_num_draft_tokens", | |
| "value": 60 | |
| }, | |
| { | |
| "name": "vllm:spec_decode_num_accepted_tokens", | |
| "value": 0 | |
| }, | |
| { | |
| "name": "vllm:spec_decode_num_accepted_tokens_per_pos", | |
| "value": null | |
| } | |
| ], | |
| "passed": true | |
| } | |
| } | |