---
title: Qwen2.5-14B-DeepSeek-R1-1M
canonical_url: "https://www.modelscope.cn/models/AI-ModelScope/Qwen2.5-14B-DeepSeek-R1-1M"
md_url: "https://www.modelscope.cn/models/AI-ModelScope/Qwen2.5-14B-DeepSeek-R1-1M.md"
repository: AI-ModelScope/Qwen2.5-14B-DeepSeek-R1-1M
last_updated: 2025-01-29
license: apache-2.0
pipeline_tag: text-generation
tasks:
  - text-generation
model_type:
  - qwen2
architectures:
  - Qwen2ForCausalLM
base_model:
  - deepseek-ai/DeepSeek-R1-Distill-Qwen-14B
  - Qwen/Qwen2.5-14B-Instruct-1M
base_model_relation: quantized
parameters: 14.8B
tensor_type:
  - BF16
library_name:
  - transformer
  - safetensors
  - gguf
  - pytorch
frameworks:
  - pytorch
inference_backends:
  - "deploy_task text/emb"
  - "lmdeploy 0.9.1"
  - "lmdeploy_turbomind 0.9.1"
  - "sglang 0.5.2"
  - "vllm 0.9.2"
downloads: 1603
stars: 5
tags:
  - gguf
---

# Qwen2.5-14B-DeepSeek-R1-1M

> Qwen2.5-14B-DeepSeek-R1-1M - AI-ModelScope 在 ModelScope 开源的模型。Qwen2.5-14B-DeepSeek-R1-1M

AI-ModelScope/Qwen2.5-14B-DeepSeek-R1-1M 是 ModelScope 魔搭社区上的 14.8B 参数text-generation模型，采用 apache-2.0 许可，基于 deepseek-ai/DeepSeek-R1-Distill-Qwen-14B、Qwen/Qwen2.5-14B-Instruct-1M 构建，可用 deploy_task text/emb、lmdeploy 0.9.1、lmdeploy_turbomind 0.9.1 部署。

- **Repository**: AI-ModelScope/Qwen2.5-14B-DeepSeek-R1-1M
- **License**: apache-2.0
- **Tasks**: text-generation
- **Parameters**: 14.8B
- **Base model**: deepseek-ai/DeepSeek-R1-Distill-Qwen-14B, Qwen/Qwen2.5-14B-Instruct-1M
- **Inference backends**: deploy_task text/emb, lmdeploy 0.9.1, lmdeploy_turbomind 0.9.1, sglang 0.5.2, vllm 0.9.2
- **Tags**: gguf
- **Downloads**: 1603
- **Stars**: 5
- **Last updated**: 2025-01-29

Source: https://www.modelscope.cn/models/AI-ModelScope/Qwen2.5-14B-DeepSeek-R1-1M

---

# Qwen2.5-14B-DeepSeek-R1-1M

A merged model combines the reasoning model's strengths (Qwen2.5-14B-DeepSeek-R1) and the long-context model capabilities (Qwen2.5-14B-Instruct-1M) for versatile performance.

# Merge config

```yaml
models:
  - model: "deepseek-ai/DeepSeek-R1-Distill-Qwen-14B"
    parameters:
      weight: 1
      density: 1

merge_method: ties
base_model: "Qwen/Qwen2.5-14B-Instruct-1M"
parameters:
  density: 1
  normalize: true
  int8_mask: true
dtype: bfloat16
```

and I needed to make some minor adjustments to the tokenizer configuration.

# How to Use
```python
from transformers import AutoModelForCausalLM, AutoTokenizer

model_name = "mkurman/Qwen2.5-14B-DeepSeek-R1-1M"
model = AutoModelForCausalLM.from_pretrained(model_name, torch_dtype="auto", device_map="auto")
tokenizer = AutoTokenizer.from_pretrained(model_name)

prompt = "Write a Python script to merge two CSV files."
messages = [
    {"role": "system", "content": "You are an expert programmer."},
    {"role": "user", "content": prompt}
]
inputs = tokenizer.apply_chat_template(messages, return_tensors="pt").to(model.device)
outputs = model.generate(inputs, max_new_tokens=512)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
```

You can use it on `LM Studio` or `Ollama` by utilizing the provided GGUF files.

# License
Apache 2.0 for open-source contribution and collaboration.
