Text Generation
Transformers
Safetensors
English
deepseek_v2
bitsmoe
Mixture of Experts
quantized
2bit
conversational
custom_code
text-generation-inference
Instructions to use zjiayu064/DeepSeek-V2-Lite-BitsMoE-2bit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use zjiayu064/DeepSeek-V2-Lite-BitsMoE-2bit with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="zjiayu064/DeepSeek-V2-Lite-BitsMoE-2bit", 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("zjiayu064/DeepSeek-V2-Lite-BitsMoE-2bit", trust_remote_code=True) model = AutoModelForCausalLM.from_pretrained("zjiayu064/DeepSeek-V2-Lite-BitsMoE-2bit", 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 zjiayu064/DeepSeek-V2-Lite-BitsMoE-2bit with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "zjiayu064/DeepSeek-V2-Lite-BitsMoE-2bit" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "zjiayu064/DeepSeek-V2-Lite-BitsMoE-2bit", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/zjiayu064/DeepSeek-V2-Lite-BitsMoE-2bit
- SGLang
How to use zjiayu064/DeepSeek-V2-Lite-BitsMoE-2bit 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 "zjiayu064/DeepSeek-V2-Lite-BitsMoE-2bit" \ --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": "zjiayu064/DeepSeek-V2-Lite-BitsMoE-2bit", "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 "zjiayu064/DeepSeek-V2-Lite-BitsMoE-2bit" \ --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": "zjiayu064/DeepSeek-V2-Lite-BitsMoE-2bit", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use zjiayu064/DeepSeek-V2-Lite-BitsMoE-2bit with Docker Model Runner:
docker model run hf.co/zjiayu064/DeepSeek-V2-Lite-BitsMoE-2bit
Update README.md
Browse files
README.md
CHANGED
|
@@ -18,10 +18,10 @@ pipeline_tag: text-generation
|
|
| 18 |
|
| 19 |
# BitsMoE-DeepSeek-V2-Lite-2bit
|
| 20 |
|
| 21 |
-
This repository provides a 2-bit quantized version of **DeepSeek-V2-Lite** using the BitsMoE quantization framework. The model was introduced in the paper [BitsMoE:
|
| 22 |
|
| 23 |
The model is based on `deepseek-ai/DeepSeek-V2-Lite` and is intended for efficient inference of Mixture-of-Experts (MoE) large language models with significantly reduced memory footprint.
|
| 24 |
-
- **Paper:** [BitsMoE:
|
| 25 |
- **Code:** [GitHub - zjiayu064/BitsMoE](https://github.com/zjiayu064/BitsMoE)
|
| 26 |
|
| 27 |
## Model Details
|
|
@@ -29,7 +29,7 @@ The model is based on `deepseek-ai/DeepSeek-V2-Lite` and is intended for efficie
|
|
| 29 |
- **Base model:** `deepseek-ai/DeepSeek-V2-Lite`
|
| 30 |
- **Quantization:** 2-bit (Experts-Only)
|
| 31 |
- **Architecture:** Mixture-of-Experts (MoE)
|
| 32 |
-
- **Method:** BitsMoE, a
|
| 33 |
|
| 34 |
## Usage
|
| 35 |
|
|
@@ -58,13 +58,13 @@ This model follows the license of the original DeepSeek-V2-Lite model. Please re
|
|
| 58 |
If you find our work useful, please consider citing:
|
| 59 |
|
| 60 |
```bibtex
|
| 61 |
-
@misc{
|
| 62 |
-
title={
|
| 63 |
author={Jiayu Zhao and Zihan Teng and Minhao Fan and Tianrui Ma and Wentao Ren and Song Chen and Weichen Liu},
|
| 64 |
year={2026},
|
| 65 |
eprint={2606.00079},
|
| 66 |
archivePrefix={arXiv},
|
| 67 |
primaryClass={cs.LG},
|
| 68 |
-
url={https://arxiv.org/abs/2606.00079}
|
| 69 |
}
|
| 70 |
```
|
|
|
|
| 18 |
|
| 19 |
# BitsMoE-DeepSeek-V2-Lite-2bit
|
| 20 |
|
| 21 |
+
This repository provides a 2-bit quantized version of **DeepSeek-V2-Lite** using the BitsMoE quantization framework. The model was introduced in the paper [BitsMoE: Cost-Aware Bit Allocation in Spectral Space for MoE LLM Quantization](https://huggingface.co/papers/2606.00079).
|
| 22 |
|
| 23 |
The model is based on `deepseek-ai/DeepSeek-V2-Lite` and is intended for efficient inference of Mixture-of-Experts (MoE) large language models with significantly reduced memory footprint.
|
| 24 |
+
- **Paper:** [BitsMoE: Cost-Aware Bit Allocation in Spectral Space for MoE LLM Quantization](https://huggingface.co/papers/2606.00079)
|
| 25 |
- **Code:** [GitHub - zjiayu064/BitsMoE](https://github.com/zjiayu064/BitsMoE)
|
| 26 |
|
| 27 |
## Model Details
|
|
|
|
| 29 |
- **Base model:** `deepseek-ai/DeepSeek-V2-Lite`
|
| 30 |
- **Quantization:** 2-bit (Experts-Only)
|
| 31 |
- **Architecture:** Mixture-of-Experts (MoE)
|
| 32 |
+
- **Method:** BitsMoE, a cost-aware bit-allocation framework for MoE LLM quantization.
|
| 33 |
|
| 34 |
## Usage
|
| 35 |
|
|
|
|
| 58 |
If you find our work useful, please consider citing:
|
| 59 |
|
| 60 |
```bibtex
|
| 61 |
+
@misc{zhao2026bitsmoecostawarebitallocation,
|
| 62 |
+
title={BitsMoE: Cost-Aware Bit Allocation in Spectral Space for MoE LLM Quantization},
|
| 63 |
author={Jiayu Zhao and Zihan Teng and Minhao Fan and Tianrui Ma and Wentao Ren and Song Chen and Weichen Liu},
|
| 64 |
year={2026},
|
| 65 |
eprint={2606.00079},
|
| 66 |
archivePrefix={arXiv},
|
| 67 |
primaryClass={cs.LG},
|
| 68 |
+
url={https://arxiv.org/abs/2606.00079},
|
| 69 |
}
|
| 70 |
```
|