Model reference · open weights
MistralLite is an open-weight language model from amazon. AxForge deploys and operates it for you on dedicated EU-owned hardware — with the licence handled where one is required.
Available as managed deployment — configured and operated for you on dedicated EU hardware, quoted per deployment.
What it is
| Released by | amazon |
|---|---|
| Type | Language models |
| Task | Text gen |
| Context | 32k tokens |
| Runs with | transformers |
| Released | 2023-10-16 |
| Popularity | 5k downloads / month |
| Licence | Open weights |
About
MistralLite is a fine-tuned Mistral-7B-v0.1 language model, with enhanced capabilities of processing long context (up to 32K tokens). By utilizing an adapted Rotary Embedding and sliding window during fine-tuning, MistralLite is able to perform significantly better on several long context retrieve and answering tasks, while keeping the simple model structure of the original model. MistralLite is useful for applications such as long context line and topic retrieval, summarization, question-answering, and etc. MistralLite can be deployed on a single AWS g5.2x instance with Sagemaker Huggingface Text Generation Inference (TGI) endpoint, making it suitable for applications that require high performance in resource-constrained environments. You can also serve the MistralLite model directly using TGI docker containers. Also, MistralLite supports other ways of serving like vLLM, and you can use MistralLite in Python by using the HuggingFace transformers and FlashAttention-2 library.
MistralLite is similar to Mistral-7B-Instruct-v0.1, and their similarities and differences are summarized below:
| Model | Fine-tuned on long contexts | Max context length | RotaryEmbedding adaptation | Sliding Window Size |
|---|---|---|---|---|
| Mistral-7B-Instruct-v0.1 | up to 8K tokens | 32K | rope_theta = 10000 | 4096 |
| MistralLite | up to 16K tokens | 32K | rope_theta = 1000000 | 16384 |
Important - Use the prompt template below for MistralLite:
What are the main challenges to support a long context for LLM?
Since the release of Mistral-7B-Instruct-v0.1, the model became increasingly popular because its strong performance
on a wide range of benchmarks. But most of the benchmarks are evaluated on short context, and not much has been investigated on its performance on long context tasks.
Then We evaluated Mistral-7B-Instruct-v0.1 against benchmarks that are specifically designed to assess the capabilities of LLMs in handling longer context.
Although the performance of the models on long context was fairly competitive on long context less than 4096 tokens,
there were some limitations on its performance on longer context. Motivated by improving its performance on longer context, we finetuned the Mistral 7B model, and produced Mistrallite. The model managed to significantly boost the performance of long context handling over Mistral-7B-Instruct-v0.1. The detailed long context evalutaion results are as below:
| Model Name | Input length | Input length | Input length | Input length | Input length |
|---|---|---|---|---|---|
| 2851 | 5568 | 8313 | 11044 | 13780 | |
| Mistral-7B-Instruct-v0.1 | 100% | 50% | 2% | 0% | 0% |
| MistralLite | 100% | 100% | 100% | 100% | 98% |
| Model Name | Input length | Input length | Input length | Input length | Input length | Input length |
|---|---|---|---|---|---|---|
| 3818 | 5661 | 7505 | 9354 | 11188 | 12657 | |
| Mistral-7B-Instruct-v0.1 | 98% | 62% | 42% | 42% | 32% | 30% |
| MistralLite | 98% | 92% | 88% | 76% | 70% | 60% |
| Model Name | Input length | Input length | Input length | Input length |
|---|---|---|---|---|
| 3264 | 5396 | 8329 | 10197 | |
| Mistral-7B-Instruct-v0.1 | 100% | 50% | 20% | 30% |
| MistralLite | 100% | 100% | 100% | 100% |
pgvector is an open-source extension for PostgreSQL supported by Amazon Aurora PostgreSQL-Compatible Edition.
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.
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.
From the published model card. Full card on the HuggingFace links in the sidebar.
Using it via the API
Once AxForge deploys mistrallite for you, it answers on the OpenAI-compatible API — the same base URL and keys as every other model. (mistrallite below is illustrative; you get the exact model name on deployment.)
$ curl -sS https://api.axforge.ai/v1/chat/completions \
-H "Authorization: Bearer $AXFORGE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"mistrallite","messages":[{"role":"user","content":"Hello"}]}'
Create an account — your API key is available in the console. 3M free tokens every 30 days with every new account.