🚀 DeepHermes-3-Llama-3-3B-Preview-Abliterated
DeepHermes 3 Preview Abliterated 是 Nous Research 旗艦 Hermes 系列大語言模型(LLM)的最新版本,也是全球首批將推理(能提高答案准確性的長思維鏈)和普通大語言模型響應模式統一到一個模型中的模型之一。我們還改進了大語言模型的註釋、判斷和函數調用功能。DeepHermes 3 Preview Abliterated 是一個混合推理模型,也是首批將“直覺”傳統模式響應和長思維鏈推理響應統一到單個模型中的大語言模型之一,可通過系統提示進行切換。
🚀 快速開始
環境準備
確保你已經安裝了必要的庫,如 torch
、transformers
和 flash_attn
。
代碼示例
import torch
from transformers import AutoTokenizer, AutoModelForCausalLM
import flash_attn
import time
tokenizer = AutoTokenizer.from_pretrained("prithivMLmods/DeepHermes-3-Llama-3-3B-Preview-Abliterated")
model = AutoModelForCausalLM.from_pretrained(
"prithivMLmods/DeepHermes-3-Llama-3-3B-Preview-Abliterated",
torch_dtype=torch.float16,
device_map="auto",
attn_implementation="flash_attention_2",
)
messages = [
{
"role": "system",
"content": "You are a deep thinking AI, you may use extremely long chains of thought to deeply consider the problem and deliberate with yourself via systematic reasoning processes to help come to a correct solution prior to answering. You should enclose your thoughts and internal monologue inside <think> </think> tags, and then provide your solution or response to the problem."
},
{
"role": "user",
"content": "What is y if y=2*2-4+(3*2)"
}
]
input_ids = tokenizer.apply_chat_template(messages, tokenize=True, add_generation_prompt=True, return_tensors='pt').to("cuda")
generated_ids = model.generate(input_ids, max_new_tokens=2500, temperature=0.8, repetition_penalty=1.1, do_sample=True, eos_token_id=tokenizer.eos_token_id)
print(f"Generated Tokens: {generated_ids.shape[-1:]}")
response = tokenizer.decode(generated_ids[0], skip_special_tokens=True, clean_up_tokenization_space=True)
print(f"Response: {response}")
✨ 主要特性
- 模式統一:將推理和普通大語言模型響應模式統一到一個模型中,可通過系統提示切換。
- 功能改進:改進了大語言模型的註釋、判斷和函數調用功能。
- 混合推理:支持“直覺”傳統模式響應和長思維鏈推理響應。
📚 詳細文檔
預期用途
DeepHermes-3-Llama-3-3B-Preview-Abliterated 旨在用於高級推理、問題解決和結構化思維生成。它無縫集成了直覺響應生成和深度思維鏈推理,非常適合需要邏輯演繹、複雜問題分析和人工智能輔助決策的任務。憑藉改進的註釋、判斷和函數調用功能,該模型非常適合研究、自動化、編碼輔助以及對準確性和可解釋性要求較高的人工智能驅動的學術或專業應用。
📄 許可證
本項目採用 Apache-2.0 許可證。
屬性 |
詳情 |
模型類型 |
文本生成模型 |
基礎模型 |
NousResearch/DeepHermes-3-Llama-3-3B-Preview |
許可證 |
Apache-2.0 |
語言 |
英文 |
任務類型 |
文本生成 |