Skip to main content

llama-index llms mistral-rs integration

Project description

LlamaIndex Llms Integration: mistral.rs

To use this integration, please install the Python mistralrs package:

Installation of mistralrs from PyPi

  1. Install Rust: https://rustup.rs/

    curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
    source $HOME/.cargo/env
    
  2. mistralrs depends on the openssl library.

To install it on Ubuntu:

sudo apt install libssl-dev
sudo apt install pkg-config
  1. Install it!
  • CUDA

    pip install mistralrs-cuda

  • Metal

    pip install mistralrs-metal

  • Apple Accelerate

    pip install mistralrs-accelerate

  • Intel MKL

    pip install mistralrs-mkl

  • Without accelerators

    pip install mistralrs

All installations will install the mistralrs package. The suffix on the package installed by pip only controls the feature activation.

Installation from source

Please follow the instructions here.

Usage

from llama_index.llms.mistral_rs import MistralRS
from mistralrs import Which

llm = MistralRS(
    which=Which.GGUF(
        tok_model_id="mistralai/Mistral-7B-Instruct-v0.1",
        quantized_model_id="TheBloke/Mistral-7B-Instruct-v0.1-GGUF",
        quantized_filename="mistral-7b-instruct-v0.1.Q4_K_M.gguf",
        tokenizer_json=None,
        repeat_last_n=64,
    ),
    max_new_tokens=4096,
    context_window=1024 * 5,
)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

llama_index_llms_mistral_rs-0.2.1.tar.gz (4.9 kB view details)

Uploaded Source

Built Distribution

File details

Details for the file llama_index_llms_mistral_rs-0.2.1.tar.gz.

File metadata

  • Download URL: llama_index_llms_mistral_rs-0.2.1.tar.gz
  • Upload date:
  • Size: 4.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.10.12 Linux/6.5.0-1025-azure

File hashes

Hashes for llama_index_llms_mistral_rs-0.2.1.tar.gz
Algorithm Hash digest
SHA256 bcf40b84b909cb8db8aabc87644cdcd6eeacd11501fc6b557110e2792886dce2
MD5 bd4836b409af28a01843df3766ec718c
BLAKE2b-256 c68c99440b584ba29dc08c18769d7abd28b9ade851a9f0223530efde8b93447f

See more details on using hashes here.

File details

Details for the file llama_index_llms_mistral_rs-0.2.1-py3-none-any.whl.

File metadata

File hashes

Hashes for llama_index_llms_mistral_rs-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 491eb1efb554d514d4e38643c76aff6f2acabd6d00f684c0ebde54b9484b80a9
MD5 72893238952ec80ef61fa85a54314992
BLAKE2b-256 6a5b2b42f1a2bbb8ee4c562d54349991758b21e4070f229243386d8a602722e0

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page