🚀 Ophiuchi-Qwen3-14B-Instruct
Ophiuchi-Qwen3-14B-Instruct基於Qwen3-14B架構,採用Qwen3ForCausalLM主幹。它經過指令調優,以增強在數學推理、代碼生成和事實準確性方面的能力。通過利用高質量數據集和長上下文架構,該模型旨在出色地解決複雜的推理任務,並在多個領域生成準確、結構化的內容。
🚀 快速開始
使用Transformers庫快速上手
from transformers import AutoModelForCausalLM, AutoTokenizer
model_name = "prithivMLmods/Ophiuchi-Qwen3-14B-Instruct"
model = AutoModelForCausalLM.from_pretrained(
model_name,
torch_dtype="auto",
device_map="auto"
)
tokenizer = AutoTokenizer.from_pretrained(model_name)
prompt = "Explain the principles of alignment in large language models."
messages = [
{"role": "system", "content": "You are a highly capable assistant focused on reasoning, coding, and factual precision."},
{"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)
generated_ids = model.generate(
**model_inputs,
max_new_tokens=512
)
generated_ids = [
output_ids[len(input_ids):] for input_ids, output_ids in zip(model_inputs.input_ids, generated_ids)
]
response = tokenizer.batch_decode(generated_ids, skip_special_tokens=True)[0]
print(response)
✨ 主要特性
- 數學和邏輯推理:經過微調,可進行逐步推理、符號邏輯和高等數學運算,支持教育和技術應用場景。
- 代碼生成與理解:針對編寫、解釋和調試各種編程語言(包括Python、JavaScript和C++)的代碼進行了優化。
- 事實完整性和精確性:在經過精心策劃和對齊的數據集上進行訓練,以提高基於事實任務的準確性並減少幻覺。
- 長上下文支持:能夠處理最多128K個輸入令牌,並生成最多8K個輸出令牌,從而能夠在長序列上提供詳細而全面的響應。
- 指令調優對齊:表現出強大的遵循多步驟指令、維護對話上下文以及在多個會話中生成結構化輸出的能力。
- 多語言能力:支持包括英語、中文、法語、西班牙語、阿拉伯語、俄語、日語、韓語等在內的29種以上語言,可實現全球通信和翻譯任務。
📚 詳細文檔
預期用途
- 解決數學和符號問題
- 代碼生成與解釋
- 以JSON、Markdown或表格格式生成結構化響應
- 長篇技術寫作和文檔編寫
- 事實問答和事實核查
- 跨STEM領域的教育輔助
- 多語言對話和翻譯任務
侷限性
- 計算要求高(建議使用A100/H100級GPU)
- 在邊緣情況或對抗性輸入下仍可能產生虛假事實
- 對結構不佳或模糊的提示敏感
- 早期錯誤可能在長輸出中傳播
- 不太適合創意小說或主觀敘事任務
參考資料
- Analysing Mathematical Reasoning Abilities of Neural Models. arXiv:1904.01557. https://arxiv.org/pdf/1904.01557
- YaRN: Efficient Context Window Extension of Large Language Models. arXiv:2309.00071. https://arxiv.org/pdf/2309.00071
📄 許可證
本項目採用Apache-2.0許可證。
模型信息
屬性 |
詳情 |
基礎模型 |
Qwen/Qwen3-14B |
模型類型 |
文本生成 |
庫名稱 |
transformers |
訓練數據集 |
open-r1/OpenR1-Math-220k、deepmind/math_dataset、burtenshaw/tulu-3-sft-personas-code-no-prompt |
標籤 |
text-generation-inference、code、math、moe |
