mistral-common  by mistralai

Inference library for Mistral models preprocessing

created 1 year ago
771 stars

Top 46.2% on sourcepulse

GitHubView on GitHub
Project Summary

This library provides the official inference tools for Mistral AI models, focusing on advanced tokenization for structured conversations and tool parsing. It's designed for developers and researchers working with Mistral's diverse model ecosystem, offering efficient pre-processing and validation capabilities.

How It Works

The library implements custom tokenizers (v1, v2, v3) that go beyond standard text-to-token conversion. They are specifically designed to parse and handle structured data, including tool calls and conversational formats, which is crucial for instruction-following and function-calling models. This approach allows for more robust and accurate interaction with Mistral's models.

Quick Start & Requirements

  • Install via pip: pip install mistral-common
  • Alternatively, install from source using Poetry: poetry install
  • Requires Python.

Highlighted Details

  • Supports tokenization for various Mistral models including Mistral 7B, Mixtral 8x7B, Mixtral 8x22B, Codestral, and Mathstral.
  • Includes validation and normalization code used in the Mistral API.
  • Provides examples for tokenizing chat completion requests with tool definitions.

Maintenance & Community

  • Official library from Mistral AI.

Licensing & Compatibility

  • License not specified in the README.

Limitations & Caveats

The specific license for this repository is not detailed in the README, which may impact commercial use or integration into closed-source projects.

Health Check
Last commit

1 day ago

Responsiveness

1 day

Pull Requests (30d)
12
Issues (30d)
14
Star History
63 stars in the last 90 days

Explore Similar Projects

Starred by Patrick von Platen Patrick von Platen(Core Contributor to Hugging Face Transformers and Diffusers) and Jeff Hammerbacher Jeff Hammerbacher(Cofounder of Cloudera).

client-python by mistralai

0.3%
628
Python SDK for Mistral AI platform
created 1 year ago
updated 1 week ago
Starred by Tobi Lutke Tobi Lutke(Cofounder of Shopify), Joe Walnes Joe Walnes(Head of Experimental Projects at Stripe), and
5 more.

LibreChat by danny-avila

0.8%
29k
Enhanced ChatGPT clone for self-hosting
created 2 years ago
updated 23 hours ago
Feedback? Help us improve.