🚀 NeuralStar_AlphaWriter_4x7b
NeuralStar_AlphaWriter_4x7b 是一個由多個模型混合而成的專家混合(MoE)模型。它在文本生成任務中表現出色,尤其在創意寫作方面。該模型結合了多個在創意寫作領域表現優秀的“專家”模型,為用戶提供高質量的文本生成能力。

🚀 快速開始
在 NovelCrafter 中寫作時,mlabonne/Beyonder - 4x7B - v3 的寫作效果令人驚歎。受 [LLM Course](https://github.com/mlabonne/llm - course) 和 LazyMergeKit 的啟發,創建了 NeuralStar_AlphaWriter_4x7b 這個專注於創意寫作的模型。
✨ 主要特性
NeuralStar_AlphaWriter_4x7b 是使用 LazyMergekit 由以下模型混合而成的專家混合(MoE)模型:
- [mlabonne/AlphaMonarch - 7B](https://huggingface.co/mlabonne/AlphaMonarch - 7B)
- FPHam/Karen_TheEditor_V2_STRICT_Mistral_7B
- [SanjiWatsuki/Kunoichi - DPO - v2 - 7B](https://huggingface.co/SanjiWatsuki/Kunoichi - DPO - v2 - 7B)
- [OmnicromsBrain/NeuralStar - 7b - Lazy](https://huggingface.co/OmnicromsBrain/NeuralStar - 7b - Lazy)
📦 安裝指南
!pip install -qU transformers bitsandbytes accelerate
💻 使用示例
基礎用法
from transformers import AutoTokenizer
import transformers
import torch
model = "OmnicromsBrain/NeuralStar_AlphaWriter_4x7b"
tokenizer = AutoTokenizer.from_pretrained(model)
pipeline = transformers.pipeline(
"text-generation",
model=model,
model_kwargs={"torch_dtype": torch.float16, "load_in_4bit": True},
)
messages = [{"role": "user", "content": "Explain what a Mixture of Experts is in less than 100 words."}]
prompt = pipeline.tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
outputs = pipeline(prompt, max_new_tokens=256, do_sample=True, temperature=0.7, top_k=50, top_p=0.95)
print(outputs[0]["generated_text"])
📚 詳細文檔
量化模型
特別感謝 MRadermacher 提供的靜態和 iMatrx 量化模型:
- .GGUF:[https://huggingface.co/mradermacher/NeuralStar_AlphaWriter_4x7b - GGUF](https://huggingface.co/mradermacher/NeuralStar_AlphaWriter_4x7b - GGUF)
- iMatrix:[https://huggingface.co/mradermacher/NeuralStar_AlphaWriter_4x7b - i1 - GGUF](https://huggingface.co/mradermacher/NeuralStar_AlphaWriter_4x7b - i1 - GGUF)
- Q4_K_M 和 Q5_K_M .gguf 文件可在 [此處](https://huggingface.co/OmnicromsBrain/NeuralStar_AlphaWriter_4x7b - GGUF) 找到,使用 mlabonne/Autogguf 創建。
配置信息
base_model: mlabonne/AlphaMonarch-7B
experts:
- source_model: mlabonne/AlphaMonarch-7B
positive_prompts:
- "chat"
- "assistant"
- "tell me"
- "explain"
- "I want"
- source_model: FPHam/Karen_TheEditor_V2_STRICT_Mistral_7B
positive_prompts:
- "edit"
- "rewrite"
- "evaluate"
- "spelling"
- "grammer"
- source_model: SanjiWatsuki/Kunoichi-DPO-v2-7B
positive_prompts:
- "storywriting"
- "write"
- "scene"
- "prose"
- "character"
- source_model: OmnicromsBrain/NeuralStar-7b-Lazy
positive_prompts:
- "codex"
- "plot"
- "outline"
- "scenebeat"
- "count"
評估結果
Open LLM Leaderboard 評估結果
詳細結果可在 此處 查看。
指標 |
值 |
平均值 |
73.31 |
AI2 推理挑戰(25 次少樣本) |
70.22 |
HellaSwag(10 次少樣本) |
88.31 |
MMLU(5 次少樣本) |
64.60 |
TruthfulQA(0 次少樣本) |
71.70 |
Winogrande(5 次少樣本) |
82.00 |
GSM8k(5 次少樣本) |
63.00 |
📄 許可證
本項目採用 Apache - 2.0 許可證。