Mistral 的擴展,以支援 64K 或 128K 的上下文窗口。

7b

44.5K 15 個月前

Readme

Yarn Mistral 是一個基於 Mistral 的模型,它將其上下文大小擴展到 128k 上下文。它由 Nous Research 開發,通過實施 YaRN 方法進一步訓練模型以支持更大的上下文窗口。

CLI

64k 上下文大小

ollama run yarn-mistral

128k 上下文大小

ollama run yarn-mistral:7b-128k

API

範例

curl -X POST https://127.0.0.1:11434/api/generate -d '{
  "model": "yarn-mistral:7b-128k",
  "prompt":"Here is a story about llamas eating grass"
 }'

參考文獻

Hugging Face

YaRN: Efficient Context Window Extension of Large Language Models