Text Generation
Transformers
Safetensors
qwen2
dashq
quantized
post-training-quantization
int3
conversational
custom_code
text-generation-inference
Instructions to use jkim96/DeepSeek-R1-Distill-Qwen-32B-DASHQ-INT3-g64 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use jkim96/DeepSeek-R1-Distill-Qwen-32B-DASHQ-INT3-g64 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="jkim96/DeepSeek-R1-Distill-Qwen-32B-DASHQ-INT3-g64", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("jkim96/DeepSeek-R1-Distill-Qwen-32B-DASHQ-INT3-g64", trust_remote_code=True) model = AutoModelForCausalLM.from_pretrained("jkim96/DeepSeek-R1-Distill-Qwen-32B-DASHQ-INT3-g64", 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=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use jkim96/DeepSeek-R1-Distill-Qwen-32B-DASHQ-INT3-g64 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "jkim96/DeepSeek-R1-Distill-Qwen-32B-DASHQ-INT3-g64" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "jkim96/DeepSeek-R1-Distill-Qwen-32B-DASHQ-INT3-g64", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/jkim96/DeepSeek-R1-Distill-Qwen-32B-DASHQ-INT3-g64
- SGLang
How to use jkim96/DeepSeek-R1-Distill-Qwen-32B-DASHQ-INT3-g64 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 "jkim96/DeepSeek-R1-Distill-Qwen-32B-DASHQ-INT3-g64" \ --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": "jkim96/DeepSeek-R1-Distill-Qwen-32B-DASHQ-INT3-g64", "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 "jkim96/DeepSeek-R1-Distill-Qwen-32B-DASHQ-INT3-g64" \ --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": "jkim96/DeepSeek-R1-Distill-Qwen-32B-DASHQ-INT3-g64", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use jkim96/DeepSeek-R1-Distill-Qwen-32B-DASHQ-INT3-g64 with Docker Model Runner:
docker model run hf.co/jkim96/DeepSeek-R1-Distill-Qwen-32B-DASHQ-INT3-g64
| { | |
| "architectures": [ | |
| "DashQQwen2ForCausalLM" | |
| ], | |
| "attention_dropout": 0.0, | |
| "auto_map": { | |
| "AutoModelForCausalLM": "modeling_dashq.DashQQwen2ForCausalLM" | |
| }, | |
| "bos_token_id": 151643, | |
| "dashq": { | |
| "format": "dashq-packed-linear", | |
| "format_version": 1, | |
| "layer_metadata": "dashq_config.json", | |
| "method": "dashq", | |
| "n_quantized_modules": 448, | |
| "params": { | |
| "bits": 3, | |
| "group_size": 64, | |
| "low_memory_optimization": false, | |
| "moe_hessian_scope": "shared", | |
| "n_samples": 128, | |
| "scale_zero_dtype": "float16", | |
| "symmetric": false, | |
| "use_error_compensation": true, | |
| "use_optimal_shrinkage": true, | |
| "use_weighted_quantization": true | |
| } | |
| }, | |
| "dtype": "bfloat16", | |
| "eos_token_id": 151643, | |
| "hidden_act": "silu", | |
| "hidden_size": 5120, | |
| "initializer_range": 0.02, | |
| "intermediate_size": 27648, | |
| "layer_types": [ | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention" | |
| ], | |
| "max_position_embeddings": 131072, | |
| "max_window_layers": 64, | |
| "model_type": "qwen2", | |
| "num_attention_heads": 40, | |
| "num_hidden_layers": 64, | |
| "num_key_value_heads": 8, | |
| "pad_token_id": null, | |
| "rms_norm_eps": 1e-05, | |
| "rope_parameters": { | |
| "rope_theta": 1000000.0, | |
| "rope_type": "default" | |
| }, | |
| "sliding_window": null, | |
| "tie_word_embeddings": false, | |
| "transformers_version": "5.15.0", | |
| "use_cache": false, | |
| "use_sliding_window": false, | |
| "vocab_size": 152064 | |
| } |