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")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("amazon/MistralLite") model = AutoModelForCausalLM.from_pretrained("amazon/MistralLite") - Inference
- Notebooks
- Google Colab
- Kaggle
- Local Apps
- 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 ·
9f347ce
1
Parent(s): c2d54e2
Update README.md
Browse files
README.md
CHANGED
|
@@ -50,6 +50,17 @@ there were some limitations on its performance on longer context. Motivated by i
|
|
| 50 |
| Mistral-7B-Instruct-v0.1 | 44.3% | 39.7% |
|
| 51 |
| MistralLite | **64.4%** | **56.2%** |
|
| 52 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 53 |
|
| 54 |
## Model Details
|
| 55 |
|
|
|
|
| 50 |
| Mistral-7B-Instruct-v0.1 | 44.3% | 39.7% |
|
| 51 |
| MistralLite | **64.4%** | **56.2%** |
|
| 52 |
|
| 53 |
+
### Example test on long context of 13400 tokens
|
| 54 |
+
- Context is from [Amazon Aurora FAQs](https://aws.amazon.com/rds/aurora/faqs/)
|
| 55 |
+
- Question: please tell me how does pgvector help with Generative AI and give me some examples.
|
| 56 |
+
- Answer from MistralLite:
|
| 57 |
+
```code
|
| 58 |
+
pgvector is an open-source extension for PostgreSQL supported by Amazon Aurora PostgreSQL-Compatible Edition.
|
| 59 |
+
|
| 60 |
+
You can use pgvector to store, search, index, and query billions of embeddings that are generated from machine learning (ML) and artificial intelligence (AI) models in your database, such as those from Amazon Bedrock (limited preview) or Amazon SageMaker. A vector embedding is a numerical representation that represents the semantic meaning of content such as text, images, and video.
|
| 61 |
+
|
| 62 |
+
With pgvector, you can query embeddings in your Aurora PostgreSQL database to perform efficient semantic similarity searches of these data types, represented as vectors, combined with other tabular data in Aurora. This enables the use of generative AI and other AI/ML systems for new types of applications such as personalized recommendations based on similar text descriptions or images, candidate match based on interview notes, customer service next best action recommendations based on successful transcripts or chat session dialogs, and more.
|
| 63 |
+
```
|
| 64 |
|
| 65 |
## Model Details
|
| 66 |
|