Model Overview Card for Mistral 7B Instruct v0.3
Basic Information
Model Name: Mistral-7B-Instruct-v0.3
Developer/Creator: Mistral AI in collaboration with Hugging Face
Release Date: 05/22/2024
Version: v0.3 latest
Model Type: Chat
Description
Overview:
The Mistral-7B-Instruct-v0.3 is an advanced version of the Mistral-7B model, fine-tuned specifically for instruction-based tasks. This model is designed to enhance language generation and understanding capabilities.
Key Features:
Extended Vocabulary: Supports up to 32,768 tokens for a diverse range of language inputs.
Version 3 Tokenizer: Improves language processing efficiency and accuracy.
Function Calling: Allows execution of predefined functions during language processing.
Instruction Fine-Tuning: Tailored for instruction-based tasks, improving contextual responses.
Intended Use:
The model is designed for a variety of scenarios including:
- Natural language understanding and generation.
- Instruction-based tasks and applications.
- Real-time data manipulation and dynamic interaction scenarios.
Mistral-7B-Instruct-v0.3 can be used for patient education since this powerful solution without high computational costs, ideal for responding quickly to patient queries. Learn more about this and other models and their applications in Healthcare here.
Language Support:
Supports multiple languages due to its extended vocabulary and advanced tokenizer.
Technical Details
Architecture:
The Mistral-7B-Instruct-v0.3 is based on a transformer architecture. It employs grouped-query attention (GQA) for faster inference and sliding window attention (SWA) to handle long sequences efficiently. Key parameters from Mistral-7B-v0.1 include:
- dim: 4096
- n_layers: 32
- head_dim: 128
- hidden_dim: 14336
- n_heads: 32
- n_kv_heads: 8
- window_size: 4096
- context_len: 8192
- vocab_size: 32,000
Training Data:
The model was trained on a diverse dataset sourced from various domains to ensure broad knowledge and robust performance. The training data encompasses a wide range of text inputs to enhance its understanding and response capabilities.
Data Source and Size:
The exact volume of training data is not specified, but it includes extensive datasets from common benchmarks and publicly available data to ensure comprehensive language coverage.
Knowledge Cutoff:
The model's knowledge is up to date as of the release date, 05/22/2024.
Diversity and Bias:
Efforts have been made to include diverse datasets to minimize biases, but users should remain cautious of potential biases due to the nature of the data sources.
Performance Metrics
Key Performance Metrics:
- Accuracy: The model exhibits high accuracy in generating contextually appropriate and coherent text based on user instructions.
- Speed: Utilizes zero-copy technology for fast inference, making it suitable for real-time applications.
- Robustness: Handles diverse inputs well and generalizes effectively across various topics and languages.
Comparison to Other Models:
- Mistral-7B outperforms Llama 2 13B across multiple benchmarks including reasoning, mathematics, and code generation.
- Achieves superior performance on instruction-based tasks compared to other 7B and 13B models.
Usage
Code Samples/SDK:
const { OpenAI } = require('openai');
const api = new OpenAI({
baseURL: 'https://api.aimlapi.com/v1',
apiKey: '<YOUR_API_KEY>',
});
const main = async () => {
const result = await api.chat.completions.create({
model: 'mistralai/Mistral-7B-Instruct-v0.3',
messages: [
{
role: 'system',
content: 'You are an AI assistant who knows everything.',
},
{
role: 'user',
content: 'Tell me, why is the sky blue?'
}
],
});
const message = result.choices[0].message.content;
console.log(`Assistant: ${message}`);
};
main();
Tutorials:
Support and Community
Community Resources:
- Hugging Face Discussion Board
Ethical Considerations
Ethical Guidelines:
- The model lacks moderation mechanisms, which are essential for deployment in environments requiring moderated outputs to avoid inappropriate or harmful content.
- Users should implement additional safeguards for ethical use.
Licensing
License Type:
- Released under the Apache 2.0 license, allowing for both commercial and non-commercial usage.