Instructions to use aws-neuron/Mistral-neuron with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use aws-neuron/Mistral-neuron with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="aws-neuron/Mistral-neuron")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("aws-neuron/Mistral-neuron") model = AutoModelForCausalLM.from_pretrained("aws-neuron/Mistral-neuron", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use aws-neuron/Mistral-neuron with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "aws-neuron/Mistral-neuron" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "aws-neuron/Mistral-neuron", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/aws-neuron/Mistral-neuron
- SGLang
How to use aws-neuron/Mistral-neuron 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 "aws-neuron/Mistral-neuron" \ --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": "aws-neuron/Mistral-neuron", "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 "aws-neuron/Mistral-neuron" \ --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": "aws-neuron/Mistral-neuron", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use aws-neuron/Mistral-neuron with Docker Model Runner:
docker model run hf.co/aws-neuron/Mistral-neuron
Commit History
-
c0a45033090c34ed8366c605b008f075e04fb5c70d5cfc607d85b1f567575a24
93c4487 -
337de27f9a06315532f84748ac3f0a75f8f7683d88f5ca7e3659b7b538c07980
676a38b -
74f98ed453da674f39ed8a82f7aa3e784d48170b05c3171ee74e6d8151561251
300c81e -
4271339d2a45cc4abbbd6c9e78fc569f61b5be6263aed8d1136c1c79881b1f04
84b8790 -
ede837d1029fd9432b342c802168ba3e49b96cc42a0af467134777c3a50e5dfc
56a3516 -
71b32bdc64207dd142f307ba1d680f6f6dece41fc1e5dae40dbc1883a010a157
be178a8 -
385aed300fe75cdbcb9714e7b4ef82e4b8029c25d0cb046330c63282d7f4ac19
03cf14c -
16d0bd4df4cb13054896675a4bcd91fb300a22ff17ce32557c827e330aa34a10
36c0ef2 -
234cd4f60532cbe12934831b0c6767536507f68f29308456188b36491f526890
fa9c0e5 -
e5bbc6ac1518183adffe256ac9df49f53b150c0d395ea45f14d8d97b684e7541
749a894 -
ce773abb7e7e1d8ec1b83953e6895d8c3c83332d8ee573928c2a30e41a47913d
88210cb -
3a9c3fc5dd2478d36f41dc0609b6521fd14e3ae4d1aad35baa1c159e2c539240
483bf93 -
3fc26f8097a3bef6dfb56109b77ed587a6ba3023ba1c8df3cac7cbe84da92943
a782784 -
12921ed9c4993dff71badf93c660e917ff8aaea69efcaeb860854f5b2a0fbbb0
7a6e1c2 -
35c78188f8b28e788904281210efde979c4200378843b3ec70de3b04e391c433
c8928ee -
initial commit
43adb64