Mistral 7 B Instruct v0.3

mistralai

Introduction

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

  1. Installation
    Install the mistral_inference library:

    pip install mistral_inference
    
  2. Download Model
    Use the huggingface_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
    )
    
  3. Run Chat Interface
    Use the mistral-chat command-line interface:

    mistral-chat $HOME/mistral_models/7B-Instruct-v0.3 --instruct --max_tokens 256
    
  4. 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.

More Related APIs in Text Generation