Text Generation
Transformers
Safetensors
deepseek_v2
conversational
custom_code
text-generation-inference
Instructions to use deepseek-ai/ESFT-token-code-lite with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use deepseek-ai/ESFT-token-code-lite with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="deepseek-ai/ESFT-token-code-lite", 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("deepseek-ai/ESFT-token-code-lite", trust_remote_code=True) model = AutoModelForCausalLM.from_pretrained("deepseek-ai/ESFT-token-code-lite", 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 deepseek-ai/ESFT-token-code-lite with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "deepseek-ai/ESFT-token-code-lite" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "deepseek-ai/ESFT-token-code-lite", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/deepseek-ai/ESFT-token-code-lite
- SGLang
How to use deepseek-ai/ESFT-token-code-lite 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 "deepseek-ai/ESFT-token-code-lite" \ --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": "deepseek-ai/ESFT-token-code-lite", "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 "deepseek-ai/ESFT-token-code-lite" \ --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": "deepseek-ai/ESFT-token-code-lite", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use deepseek-ai/ESFT-token-code-lite with Docker Model Runner:
docker model run hf.co/deepseek-ai/ESFT-token-code-lite
| {"experts": {"1": [24, 32, 6, 33, 30, 62, 28, 44, 55], "2": [57, 47, 34, 39, 30, 45, 35, 48, 13, 37, 41], "3": [29, 20, 1, 36, 23, 54, 9, 49, 22, 31], "4": [48, 35, 60, 40, 24, 63, 22, 55, 59], "5": [14, 10, 25, 34, 56, 53, 38, 12, 59, 21], "6": [4, 25, 59, 34, 20, 11, 55, 50, 6], "7": [13, 5, 28, 47, 26, 61, 21, 4, 55], "8": [1, 27, 11, 8, 55, 18, 2, 53], "9": [26, 11, 53, 1, 56, 61, 59, 48], "10": [63, 44, 50, 45, 10, 30, 17, 58], "11": [30, 63, 58, 5, 52, 39, 53], "12": [58, 46, 52, 7, 15, 18, 30, 42], "13": [19, 37, 55, 23, 40, 38, 61], "14": [43, 11, 53, 30, 56, 37, 33], "15": [59, 9, 18, 16, 19, 15, 32], "16": [10, 55, 20, 14, 22, 54, 25, 48], "17": [6, 51, 17, 36, 25, 2, 35, 58, 52], "18": [0, 9, 27, 6, 21, 34, 16], "19": [32, 7, 57, 20, 52, 4, 14, 47, 12], "20": [27, 50, 16, 32, 7, 19, 21, 23], "21": [44, 41, 48, 35, 25, 59, 55, 27], "22": [23, 62, 36, 40, 53, 0, 9, 16, 12, 5], "23": [25, 50, 42, 54, 51, 18, 33, 35], "24": [16, 34, 39, 55, 51, 9, 12, 54, 23, 13], "25": [51, 58, 27, 44, 35, 17, 16, 31, 40, 1], "26": [23, 19, 16, 50, 47, 12, 60, 42, 58, 18]}, "shared_experts": false, "non_expert_modules": false} |