Instructions to use amazon/MistralLite with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use amazon/MistralLite with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="amazon/MistralLite")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("amazon/MistralLite") model = AutoModelForCausalLM.from_pretrained("amazon/MistralLite", device_map="auto") - Inference
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use amazon/MistralLite with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "amazon/MistralLite" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "amazon/MistralLite", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/amazon/MistralLite
- SGLang
How to use amazon/MistralLite 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 "amazon/MistralLite" \ --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": "amazon/MistralLite", "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 "amazon/MistralLite" \ --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": "amazon/MistralLite", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use amazon/MistralLite with Docker Model Runner:
docker model run hf.co/amazon/MistralLite
Commit History
-
corrected table formatting error for topic retrieval results
aws-kha608366
-
Update config.json
26912c3
-
Update README.md
2348608
-
Update README.md
f4c8132
-
Upload tokenizer.model (#3)
- Upload tokenizer.model (3f97bdcfbd57bb55bc4f29cfd894ac9aec73c2b4) Co-authored-by: Jeffrey Quesnelle <emozilla@users.noreply.huggingface.co>4ececff
-
Update README.md
114c6dc -
Update README.md (#1)
- Update README.md (678ee62407363bcf519cd74bf19ff16318c33d15) Co-authored-by: Amir Sartipi <Amir13@users.noreply.huggingface.co>52d2d5a -
Update README.md
580661e -
Update README.md
52529e2 -
Update README.md
d3c47d7 -
Update README.md
f8e22b4 -
Update README.md
5cc44e3 -
Update README.md
90fed38
-
Update README.md
0ae4abd -
Update README.md
ae1084a -
Update README.md
d67f72a -
Update README.md
d1f0846 -
Update README.md
9f347ce -
Update README.md
c2d54e2 -
Update README.md
ba4d664 -
Update README.md
1cd6a22 -
Update README.md
2ae0e2b -
Update README.md
66d630e -
Update README.md
Fix a typo.edaa6d1 -
Update README.md
9416971 -
Upload folder using huggingface_hub
8c3ba9e -
initial commit
8ade218