File size: 3,052 Bytes
6f7a18b
 
 
 
 
 
 
 
 
 
 
 
 
 
f976928
6f7a18b
97a64f8
 
001143f
 
6f7a18b
 
 
f28a97e
 
 
 
 
 
26da2b5
 
f28a97e
 
 
 
 
 
 
 
6f7a18b
3bf4916
6f7a18b
 
 
 
 
7f95447
3bf4916
e0231df
8ee3c01
 
 
3bf4916
8ee3c01
 
e0231df
 
3bf4916
e0231df
e41181f
 
 
 
6f7a18b
 
f976928
6f7a18b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
---
license: apache-2.0
language:
- zh
- en
tags:
- qwen
- sales
- unsloth
- lora
- logic-tuning
- strategic-thinking
---

# 启明(QiMing)

---

## 重新定义了逻辑的AI,只为更智能.
## An AI that rewrites its own rules for greater intelligence.

---

# 声明

## 模型产生的内容仅供参考,请认真核实后使用
## 此为4B底层模型,会出现信息不足和幻觉错误
## 若觉得此AI模型太像"人",请务必认清,这只是一个更智能的AI模型

---

# DISCLAIMER

## The content generated by this model is for reference purposes only. Users are advised to verify its accuracy independently before use.
## This is a 4-billion-parameter foundation model (4B). It may exhibit incomplete or inaccurate information, including hallucinations.
## If you find this AI too human-like, please remember: it is merely a more intelligent model — not an actual person.

---

### 感谢mradermacher制作的gguf版本
### Thanks mradermacher: For creating the GGUF versions of these models

https://huggingface.co/mradermacher/QiMing-Plus-v1-GGUF

https://huggingface.co/mradermacher/QiMing-Plus-v1-i1-GGUF

### 感谢Qwen团队制作的模型
### The Qwen Team: For developing the foundational model (Qwen/Qwen3-4B-Thinking-2507) used in this project.

https://qwen.ai

### 感谢unsloth,能够让模型调整在3070 8G的显卡上流畅运行
### unsloth.ai (Unsloth): For their work enabling smooth operation of these models on standard hardware like NVIDIA GeForce RTX 3070 GPU with 8GB VRAM.

https://unsloth.ai

### QiMing-Plus-v1基于Qwen/Qwen3-4B-Thinking-2507构建
### QiMing-Plus-v1 is built upon Qwen/Qwen3-4B-Thinking-2507 as its base model.

### Dataset

https://huggingface.co/datasets/aifeifei798/QiMing_Plus_dataset

---

# 如何使用 (how to use)

```python
from transformers import AutoModelForCausalLM, AutoTokenizer
model_name = "aifeifei798/QiMing-Plus-v1"
# load the tokenizer and the model
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForCausalLM.from_pretrained(
    model_name,
    torch_dtype="auto",
    device_map="auto"
)
# prepare the model input
prompt = "Give me a short introduction to large language model."
messages = [
    {"role": "user", "content": prompt}
]
text = tokenizer.apply_chat_template(
    messages,
    tokenize=False,
    add_generation_prompt=True,
)
model_inputs = tokenizer([text], return_tensors="pt").to(model.device)
# conduct text completion
generated_ids = model.generate(
    **model_inputs,
    max_new_tokens=32768
)
output_ids = generated_ids[0][len(model_inputs.input_ids[0]):].tolist() 
# parsing thinking content
try:
    # rindex finding 151668 (</think>)
    index = len(output_ids) - output_ids[::-1].index(151668)
except ValueError:
    index = 0
thinking_content = tokenizer.decode(output_ids[:index], skip_special_tokens=True).strip("\n")
content = tokenizer.decode(output_ids[index:], skip_special_tokens=True).strip("\n")
print("thinking content:", thinking_content) # no opening <think> tag
print("content:", content)
```