Mistral's new 7B Model with Native Function Calling

Mistral has released a new 7B model with an extended tokenizer and support for function calling, showcasing promising performance in tasks like medical comparisons and function execution. The model’s licensing requires user opt-in, and its unique response style and function calling capabilities make it a valuable tool for natural language processing tasks, encouraging further exploration and experimentation.

Mistral has released a new version of their 7B model, which has been made available on Hugging Face without any official announcement. The model includes a new base model and an extended tokenizer with 768 more tokens. The model’s performance in benchmarks, particularly in tasks like medical comparisons and GSM 8K, has been compared to other models like Llama 3, with varying results. The addition of support for function calling is a notable feature of the new Mistral model, which includes special tokens related to tool calls and results.

A simple notebook for testing the Instruct model has been created, demonstrating how to run it using Hugging Face transformers. The new tokenizer significantly differs from the previous version, suggesting deliberate support for other languages. The Mistral model requires a specific user-assistant-user-assistant message format, with no room for system messages. The model’s response style is noted to be more concise compared to other models like Llama 3 or OpenAI, reflecting the dataset used for fine-tuning.

The Mistral Inference package allows users to download the model and tokenizer files for running the model through a command line interface. The model’s licensing, Apache 2, still requires users to opt in with their name and email, potentially for data tracking purposes. The Mistral Inference code provides an alternative way to load and run the model, separate from the Hugging Face approach. Function calling examples are included in the Mistral model, showcasing the ability to execute specific functions based on input parameters.

The Mistral model’s function calling feature utilizes special tokens for tool calls, allowing for specific function executions. The model demonstrates the capability to understand and execute function calls based on defined parameters like location and format. The Mistral model’s performance in various tasks like generating responses and executing function calls is evaluated, showing promising results in some areas like React prompting. The potential for parallel function calling and further experimentation with the model is highlighted for future exploration.

In conclusion, the Mistral model’s new 7B version offers enhanced capabilities with support for function calling and an extended tokenizer. While its performance in benchmarks may vary compared to other models like Llama 3, the Mistral model shows potential for interesting fine-tuning and merges. The model’s unique response style and support for function calling make it a valuable tool for various natural language processing tasks. Further exploration and experimentation with the Mistral model are encouraged to uncover its full potential and capabilities.