Instructions to use NousResearch/Yarn-Mistral-7b-128k with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use NousResearch/Yarn-Mistral-7b-128k with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="NousResearch/Yarn-Mistral-7b-128k", trust_remote_code=True)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("NousResearch/Yarn-Mistral-7b-128k", trust_remote_code=True) model = AutoModelForCausalLM.from_pretrained("NousResearch/Yarn-Mistral-7b-128k", trust_remote_code=True) - Inference
- Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use NousResearch/Yarn-Mistral-7b-128k with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "NousResearch/Yarn-Mistral-7b-128k" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "NousResearch/Yarn-Mistral-7b-128k", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/NousResearch/Yarn-Mistral-7b-128k
- SGLang
How to use NousResearch/Yarn-Mistral-7b-128k with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "NousResearch/Yarn-Mistral-7b-128k" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "NousResearch/Yarn-Mistral-7b-128k", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "NousResearch/Yarn-Mistral-7b-128k" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "NousResearch/Yarn-Mistral-7b-128k", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use NousResearch/Yarn-Mistral-7b-128k with Docker Model Runner:
docker model run hf.co/NousResearch/Yarn-Mistral-7b-128k
Adding `safetensors` variant of this model
#19 opened about 2 years ago
by
SFconvertbot
Adding Evaluation Results
#18 opened about 2 years ago
by
leaderboard-pr-bot
any plans for mixtral 128k?
#17 opened over 2 years ago
by
sirus
Transformers fix to mixed precision at long context lengths
👍 1
1
#16 opened over 2 years ago
by
nbroad
How much computation power(like gpus and gpu hour) you guys needed to finetune this?
👍 2
1
#15 opened over 2 years ago
by
zohadev
Yarn-StableLM-Epoch?
#14 opened over 2 years ago
by
KnutJaegersberg
Instruction finetuning and train script, QLORA etc.
👍 3
#13 opened over 2 years ago
by
aamir1122a
Add widget examples
👍 1
#11 opened over 2 years ago
by
mishig
Using this model with Vllm
1
#10 opened over 2 years ago
by
haltux
Can't deploy to any provider an inference endpoint
2
#9 opened over 2 years ago
by
ejkkan
Pretraining from scratch?
#8 opened over 2 years ago
by
MengboZhou
Fine-tuned with all parameters?
👍 2
1
#6 opened over 2 years ago
by
MengboZhou
VRAM usage for full 128k tokens
7
#5 opened over 2 years ago
by
Hypersniper
sliding_window = 131072? Sliding window attention doesn't work for 128?
1
#4 opened over 2 years ago
by
keyishen
smaller shards, pls
#2 opened over 2 years ago
by
lskywalker
Instruct Version?
👍 1
8
#1 opened over 2 years ago
by
mrfakename