Nous-Yarn-Mistral-7b-128k 是一种最先进的语言模型,用于处理长篇文本语境,采用 YaRN 扩展方法对长篇文本数据进行了 1500 步的进一步预训练。它是 Mistral-7B-v0.1 的扩展版本,支持 128k 令牌的语境窗口。
要使用,加载模型时传递 trust_remote_code=True 参数,例如:
model = AutoModelForCausalLM.from_pretrained("NousResearch/Yarn-Mistral-7b-128k", use_flash_attention_2=True, torch_dtype=torch.bfloat16, device_map="auto", trust_remote_code=True)此外,您需要使用最新版本的 transformers(在 4.35 版本发布之前)。
pip install git+https://github.com/huggingface/transformers长文本语境基准测试:
短文本语境基准测试显示质量下降最小:
https://huggingface.co/NousResearch/Yarn-Mistral-7b-128k
下一篇: 最后一页
tortoise-tts学习资料汇总 - 高质量多声音TTS系统
2024-12-31
PaddleSpeech入门学习资料汇总 - 开源语音AI工具包
2025-01-02
pot-desktop使用指南 - 跨平台划词翻译和OCR软件
2025-01-02
understand-prompt学习资料汇总 - AI助手的探索与应用
2025-01-02
GPT4All学习资源汇总 - 在本地设备上运行大型语言模型
2025-01-02
2025-01-02
wechat-bot入门指南 - 基于ChatGPT的微信聊天机器人
2025-01-02
Cheetah - AI助手学习资料汇总 - Mac应用助力远程技术面试
2025-01-02
AI代码翻译器学习资料汇总 - 使用AI将代码从一种语言翻译成另一种语言
2025-01-02