Text Generation
MLX
Safetensors
English
Chinese
deepseek_v4
apple-silicon
deepseek
deepseek-v4
mixture-of-experts
Mixture of Experts
quantized
4-bit precision
8-bit precision
affine
Instructions to use Deviad/DeepSeek-V4-Flash-MLX-Q4Q8 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use Deviad/DeepSeek-V4-Flash-MLX-Q4Q8 with MLX:
# Make sure mlx-lm is installed # pip install --upgrade mlx-lm # if on a CUDA device, also pip install mlx[cuda] # Generate text with mlx-lm from mlx_lm import load, generate model, tokenizer = load("Deviad/DeepSeek-V4-Flash-MLX-Q4Q8") prompt = "Once upon a time in" text = generate(model, tokenizer, prompt=prompt, verbose=True) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- LM Studio
- MLX LM
How to use Deviad/DeepSeek-V4-Flash-MLX-Q4Q8 with MLX LM:
Generate or start a chat session
# Install MLX LM uv tool install mlx-lm # Generate some text mlx_lm.generate --model "Deviad/DeepSeek-V4-Flash-MLX-Q4Q8" --prompt "Once upon a time"
| <|begin▁of▁sentence|>You are a helpful assistant. | |
| ## Tools | |
| You have access to a set of tools to help answer the user's question. You can invoke tools by writing a "<|DSML|tool_calls>" block like the following: | |
| <|DSML|tool_calls> | |
| <|DSML|invoke name="$TOOL_NAME"> | |
| <|DSML|parameter name="$PARAMETER_NAME" string="true|false">$PARAMETER_VALUE</|DSML|parameter> | |
| ... | |
| </|DSML|invoke> | |
| <|DSML|invoke name="$TOOL_NAME2"> | |
| ... | |
| </|DSML|invoke> | |
| </|DSML|tool_calls> | |
| String parameters should be specified as is and set `string="true"`. For all other types (numbers, booleans, arrays, objects), pass the value in JSON format and set `string="false"`. | |
| If thinking_mode is enabled (triggered by <think>), you MUST output your complete reasoning inside <think>...</think> BEFORE any tool calls or final response. | |
| Otherwise, output directly after </think> with tool calls or final response. | |
| ### Available Tool Schemas | |
| {"name": "get_weather", "description": "Get the weather for a specific location", "parameters": {"type": "object", "properties": {"location": {"type": "string", "description": "The city name"}, "unit": {"type": "string", "enum": ["celsius", "fahrenheit"], "description": "Temperature unit"}}, "required": ["location"]}} | |
| {"name": "search", "description": "Search the web for information", "parameters": {"type": "object", "properties": {"query": {"type": "string", "description": "Search query"}, "num_results": {"type": "integer", "description": "Number of results to return"}}, "required": ["query"]}} | |
| You MUST strictly follow the above defined tool name and parameter schemas to invoke tool calls. | |
| <|User|>What's the weather in Beijing?<|Assistant|><think>The user wants to know the weather in Beijing. I should use the get_weather tool.</think> | |
| <|DSML|tool_calls> | |
| <|DSML|invoke name="get_weather"> | |
| <|DSML|parameter name="location" string="true">Beijing</|DSML|parameter> | |
| <|DSML|parameter name="unit" string="true">celsius</|DSML|parameter> | |
| </|DSML|invoke> | |
| </|DSML|tool_calls><|end▁of▁sentence|><|User|><tool_result>{"temperature": 22, "condition": "sunny", "humidity": 45}</tool_result><|Assistant|><think>Got the weather data. Let me format a nice response.</think>The weather in Beijing is currently sunny with a temperature of 22°C and 45% humidity.<|end▁of▁sentence|> |