Mistral 7 B Instruct v0.3
mistralaiIntroduction
The Mistral-7B-Instruct-v0.3 is a large language model fine-tuned from Mistral-7B-v0.3, designed for instruct-based tasks. It features an extended vocabulary of 32,768 tokens, supports the v3 tokenizer, and allows for function calling.
Architecture
Mistral-7B-Instruct-v0.3 builds upon the Mistral-7B-v0.3 architecture with enhancements such as an expanded vocabulary and improved tokenizer support. These upgrades facilitate more efficient text generation and interaction capabilities.
Training
The model has been fine-tuned to follow instructions and generate coherent responses. It uses the mistral-inference
library for deployment, enabling advanced capabilities like function calling and conversational AI.
Guide: Running Locally
-
Installation
Install themistral_inference
library:pip install mistral_inference
-
Download Model
Use thehuggingface_hub
to download the model:from huggingface_hub import snapshot_download from pathlib import Path mistral_models_path = Path.home().joinpath('mistral_models', '7B-Instruct-v0.3') mistral_models_path.mkdir(parents=True, exist_ok=True) snapshot_download( repo_id="mistralai/Mistral-7B-Instruct-v0.3", allow_patterns=["params.json", "consolidated.safetensors", "tokenizer.model.v3"], local_dir=mistral_models_path )
-
Run Chat Interface
Use themistral-chat
command-line interface:mistral-chat $HOME/mistral_models/7B-Instruct-v0.3 --instruct --max_tokens 256
-
Function Calling and Text Generation
Utilize the provided code snippets to experiment with function calling and text generation using the Transformers library.
Cloud GPUs
For optimal performance, consider using cloud GPUs such as those provided by AWS, Google Cloud, or Azure, which offer scalable resources for handling large models.
License
The Mistral-7B-Instruct-v0.3 model is released under the Apache 2.0 license, allowing for broad use and modification.