[Deepmini] - A Modified DeepSeekV3 for Bilingual Reasoning
Model Description
This model is based on the DeepSeekV3 architecture but incorporates several key modifications. Notably, the MTP (Multi-head Latent Prediction) module has been removed, and it utilizes a 1+4 Mixture of Experts (MoE) routing strategy.
The development focused on enhancing bilingual (Chinese & English) understanding and reasoning capabilities, particularly in areas like code generation and mathematical problem-solving.
Development Status: ⚠️ This model is currently under testing and evaluation. Performance may vary, and further refinements are ongoing.
Training Data
The model underwent post-training on a bilingual corpus composed of:
fineweb
datasetfineweb-chinese
dataset
A R1 distillation technique using reasoning trajectories was employed during this training phase to potentially improve inference alignment.
Fine-tuning Data
Instruction fine-tuning was performed using trajectory data focused on reasoning tasks, including:
- Code generation and understanding
- Mathematical problem-solving
- Other reasoning-intensive instructions
Model Parameters
Here's a comparison of the key parameters for this model (based on the "Large Model" configuration provided) versus the DeepSeekMini model for reference:
Parameter | Value ([DeepSeekv3]) | Reference (DeepSeekMini) | Description (from original table) |
---|---|---|---|
hidden_size |
7168 | 1024 | Determines computation and representation capacity per layer. Higher value means stronger model. |
num_hidden_layers |
61 | 8 | Represents the depth of the transformer, affecting context modeling ability. |
num_attention_heads |
128 | 12 | More heads can enhance parallel attention expressiveness. |
intermediate_size |
18432 | 2560 | Dimension of the FFN layer, affecting non-linear transformation capability. |
n_routed_experts |
256 | 16 | Number of candidate experts per layer (used with MoE), determining sparsity and parameters. |
num_experts_per_tok |
8 | 4 | Determines how many experts each token is routed to for processing. |
kv_lora_rank (MLA) |
512 | 64 | LoRA rank on Key/Value (compression dimension), affects parameters. (MLA: ?) |
q_lora_rank |
1536 | 128 | Similarly, LoRA rank on Query (compression dimension). |
max_position_embeddings |
163840 | 4096 | Maximum supported context length. This model supports much longer context than the Mini reference. |
quantization_config |
"FP8, 动态量化" | 16位精度量化 | Large model training used FP8 precision for memory savings. (Dynamic Quantization) |
tie_word_embeddings |
false | true | Mini model ties embeddings to save parameters; this model does not. |
vocab_size |
129280 | 129280 | Mini model uses a large vocabulary which can effectively improve inference performance. |
(Note: The "Large Model" column values describe this specific model.)
How to Use
from transformers import AutoTokenizer, AutoModelForCausalLM
import torch
# Replace with your model's path on Hugging Face Hub or local directory
model_id = "jinliuxi/deepmini-it"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
model_id,
torch_dtype=torch.bfloat16, # Or torch.float16 if preferred/supported
device_map="auto",
trust_remote_code=True # Required if custom code is used in the model definition
)
# Define the prompt using the model's expected format
user_prompt = "介绍一下厦门大学"
prompt = f"<|begin of sentence|><|User|>{user_prompt}<|Assistant|>"
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
# Generate response
outputs = model.generate(
**inputs,
max_new_tokens=512,
do_sample=True,
temperature=0.7,
top_p=0.9,
eos_token_id=tokenizer.eos_token_id # Ensure generation stops correctly
)
response = tokenizer.decode(outputs[0], skip_special_tokens=False) # Keep special tokens to see the full structure initially
# Print the full response including the prompt part
print(response)
# You might want to extract only the generated part:
generated_text = tokenizer.decode(outputs[0][inputs.input_ids.shape[1]:], skip_special_tokens=True)
print("\n--- Generated Text Only ---")
print(generated_text)
Prompt Format
The model expects prompts in the following format:
<|begin of sentence|><|User|>{Your Prompt Here}<|Assistant|>
The model may generate internal reasoning steps enclosed in <think>...</think> tags before providing the final answer. Depending on your use case, you might want to parse and potentially hide the <think> block from the end-user.
Example Dialogue (Provided by User)
<|begin of sentence|><|User|>介绍一下厦门大学<|Assistant|>
<think>
嗯,用户让我介绍一下厦门大学。首先,我需要确定这个学校的背景和核心地位。厦门大学的历史很悠久,有鲜明的特色。我应该从地理位置、学科设置、教育体系等方面来考虑。
首先想到的是经济方面,厦门作为中国重要的城市,可能拥有丰富的自然资源。比如学校可能有很多传统农业学校,比如厦门大学或者台湾的工科所。这些学校通常会有分校或者分校,但不确定是否适合学生选择。另外,交通和住宿也是重点,尤其是学生上学的话,特别是对校园生活的影响。
然后是语言环境,厦门大学作为大学,可能对学生的日常生活和文化活动有兴趣,比如参与学生会、社团或者社团活动。另外,学校可能提供课外活动,比如社团活动、社会实践等,让学生动手实践。
接下来是师资力量,厦门大学在校园里有很多教授,包括科学家、工程师、音乐教师、艺术家等,还有各种教学设施和课程。这些资源能帮助学生建立更广泛的师生关系。
师资力量的话,可能包括本科生和研究生,以及校友网络。比如本科生需要更多的资源和良好的学习环境,而研究生可能需要更多的科研项目或实习机会。
教育资源的丰富性也是一个重要点,厦门大学注重培养学生综合能力。例如,是否有顶尖的体育课、艺术课程等,这些可以在其他高校获取。
还要考虑到用户可能的深层需求,比如他们可能是学生想了解校园生活的各个方面,或者对未来的规划感兴趣。所以回答时需要平衡学术性和实用性,给出实际的学习建议。
另外,要注意避免过于专业的术语,保持口语化,让解释更易懂。同时,加入一些个人经历或项目成果,增强真实性和实用性。
总结一下,结构应该是:地理分布、学科布局、师资力量、师资培训、师资力量、管理策略、评价体系、评价标准、评价标准、评估方法、案例分析等。每个部分下给出具体例子和数据支持,这样用户容易理解。
</think>
厦门大学(Cleveland Company, CIB)作为中国综合性大学,其历史底蕴深厚,既有深厚的政治实力,也有复杂的专业领域,尤其在科技、传媒等领域具有独特优势。以下从多个维度详细介绍该校的历史与学科特色:
---
### **一、历史积淀**
1. **厦门大学**
- **历史底蕴**:以“郑光启院士”为导师,注重学科交叉和跨学科应用。
- **学科定位**:以理学、经济学、历史学为核心研究领域,培养独立思考、创新思维和综合素质。
- **教育理念**:强调“知行合一”,强调知行合一的结合与实践性。
2. **人文积淀**:以“师者视角”、“仁爱之心”为主线,融合历史、哲学、历史学、科学史等多重理论,培养终身学习能力。
3. **国际化视野**:依托厦门大学与欧美高校的联合办学,注重国际交流合作,注重与国际先进水平对比。
---
### **二、学科定位**
- **计算机科学与工程**:注重计算机、物理、化学、计算机科学和生物统计学,推动技术发展。
- **工程与技术教育**:注重土木工程、石油工程、电子科技大学的发展,培养复合型人才。
- **生态科学与环保**:注重海洋科学和碳中和,致力于绿色能源与环境治理。
- **人工智能与人文社科**:关注自然、社会科学和社会问题,提升公众素养与社会创造力。
---
### **三、学科特色**
- **学科交叉**:以理学、经济学、历史学、心理学为核心,兼顾批判性思维和批判性思考。
- **多元学科协同**:涵盖经济学、法律、科技、社会等多个领域,深化了对新兴领域的学习和实践。
- **实践导向**:通过校企合作、校企合作等方式拓宽视野,拓宽知识面。
---
### **四、师资力量**
- **导师团队**:通过行业导师、导师制生等渠道输送优秀教师。
- **导师制度**:通过校内导师制选拔、兼职任教、校企合作等形式扩大影响力。
- **社区资源**:鼓励企业、高校与企业合作开展科研项目,促进产学研结合。
- **实习与就业**:定期组织相关实习,拓宽就业路径。
---
### **五、教师队伍**
- **实验室/实训**:依托厦门大学双一流实验室和福建省高层次骨干力量。
- **暑期社会实践**:参与福建省大学生创业大赛、乡村振兴调研等活动。
- **海外研修**:参与海峡两岸文化交流项目(如海峡两岸青年志愿者协会),提升自身软技能。
---
### **六、专业特色**
- **基础课程**:辅修教材、模拟实战演练(如国际传播、政策法规)。
- **实践能力**:培养复合型人才、职业素养、创新能力。
- **师资力量**:近三年在校生年均获得国家级认证(如厦门大学国际学院认证),近年获全球最佳学位授予单位。
---
### **七、师资力量**
- **学术带头人**:参与福建省教育厅、福建省文明校园建设及海峡两岸文化交流项目。
- **跨文化传承人**:参与联合国教科文组织的国际传播小组(如《福建地区文化与历史》)。
---
### **八、课程体系**
- **必修课**:涵盖经济学、教育学、文学、历史学、伦理学等。
- **选修课**:如《百年铁道》《环球时报》等。
- **国际交流**:参与中美澳联合办、日本“一带一路”项目等。
---
### **九、管理实践**
- **课程安排**:制定班级管理制度、后勤保障机制、应急预案等。
- **考核与考核**:指导学生参加省级以上课程并担任专业课(如设计竞赛、竞赛辅导),参与年度评选。
---
### **十、典型案例参考**
- **厦门大学**:开设**“中国高校可持续发展研究中心”(2021年)、**海洋学院**(培养目标)。
- **厦门大学**:聚焦海洋、新能源、元宇宙等主题,探索虚拟现实(VR)和AR技术应用。
---
通过系统性布局,厦门大学在学科建设、师资建设和人才培养上取得突破,成为连接国际与国内的教育枢纽。
(Note: The content of the dialogue example is provided by the user. As the model is still under testing, the factual accuracy of the response (especially regarding specific details about Xiamen University) should be verified.)
Limitations and Bias
This model is based on DeepSeekV3 and inherits capabilities and potential limitations from its base architecture and training data.
As the model is still under testing, it may produce inaccurate, biased, or otherwise unexpected outputs.
The training data includes web text (fineweb), which can contain societal biases reflected in the model's generations.
Performance on highly specialized or out-of-domain tasks may be limited.
Citation
If you use this model, please consider citing the original DeepSeek paper(s) as appropriate.
<!-- Add BibTeX citation for DeepSeek V2/V3 if available -->
@misc{deepseek-v2,
title={DeepSeek-V2: A Strong, Economical, and Efficient Mixture-of-Experts Language Model},
author={DeepSeek-AI},
year={2024},
eprint={2405.04434},
archivePrefix={arXiv},
primaryClass={cs.CL}
}
IGNORE_WHEN_COPYING_START
content_copy
download
Use code with caution.
Xml
IGNORE_WHEN_COPYING_END
- Downloads last month
- 28