mistral-finetune
by
mistralai

Description: The mistral-finetune repository is a Python-based codebase designed to enable memory-efficient and performant fine-tuning of Mistral's language models.

View on GitHub ↗

Summary Information

Updated 1 hour ago
Added to GitGenius on May 29th, 2024
Created on May 24th, 2024
Open Issues & Pull Requests: 0 (+0)
Number of forks: 319
Total Stargazers: 3,091 (+0)
Total Subscribers: 46 (+0)

Issue Activity (beta)

Open issues: 0
New in 7 days: 0
Closed in 7 days: 0
Avg open age: N/A days
Stale 30+ days: 0
Stale 90+ days: 0

Recent activity

Opened in 7 days: 0
Closed in 7 days: 0
Comments in 7 days: 0
Events in 7 days: 0

Top labels

  • bug (22)

Most active issues this week

No issue events were indexed in the last 7 days.

Repository Insights (GitGenius)

Median issue/PR response: 1.3 hours
Mean response time: 85.7 days
90th percentile: 734.5 days
Tracked items: 45

Most active contributors

Detailed Description

The mistral-finetune repository is a Python-based codebase designed to enable memory-efficient and performant fine-tuning of Mistral's language models. The repository implements LoRA (Low-Rank Adaptation), a training paradigm where most model weights remain frozen while only 1-2% of additional weights in the form of low-rank matrix perturbations are trained. The codebase is optimized for multi-GPU single-node training setups, though smaller models like the 7B variant can run on a single GPU. For maximum efficiency, the developers recommend using A100 or H100 GPUs.

According to the README, the repository is now archived and no longer actively maintained, with a note that Mistral may launch a new library or major update in the future if community needs warrant it or if they believe they can bring additional value to the fine-tuning ecosystem. Despite this archived status, the repository provides a simple and guided entry point for fine-tuning Mistral models, though it is intentionally opinionated, particularly around data formatting requirements, and does not aim to be exhaustive across multiple model architectures or hardware types.

The codebase supports fine-tuning across multiple Mistral model variants, including the 7B Base V3, 7B Instruct v3, Mixtral 8x7B models, Mixtral 8x22B variants, Mistral Nemo 12B, and Mistral Large 2 123B models. Recent updates documented in the repository include compatibility with Mistral Large v2 as of August 2024 and Mistral Nemo as of July 2024, with specific guidance on memory requirements and hyperparameter adjustments for each model variant.

The repository enforces strict data formatting requirements, supporting two primary data types: pretrain data stored as plain text in a "text" key within JSONL format files, and instruct data supporting both conversational formats with user-assistant-system roles and function calling formats with tool integration. The codebase includes utility scripts for data validation and reformatting, such as validate_data.py for checking dataset correctness and estimating training time, and reformat_data.py for correcting common data formatting issues.

GitGenius activity tracking shows the repository has a median issue and pull request response latency of 1.3 hours across 45 tracked items, with a mean latency of 2056.4 hours. The most active contributor tracked is juliendenize with 71 events, followed by CorentinWicht and patrickvonplaten with 9 events each. Bug reports represent the most active issue label category with 22 tracked items. The repository shares overlapping contributors with vllm-project/vllm, ollama/ollama, and pytorch/pytorch, indicating connections to the broader ecosystem of language model inference and training projects.

The codebase is classified across 20 GitGenius categories spanning pre-trained models, NLP tasks, dataset integration, neural network optimization, fine-tuning, model adaptation, machine learning, language models, text processing, AI development, transfer learning, and related domains. The repository includes example configuration files and tutorials, such as a Colab notebook for fine-tuning the 7B model, making it accessible for users wanting to adapt Mistral models to specific tasks and domains.

mistral-finetune
by
mistralaimistralai/mistral-finetune

Repository Details

Fetching additional details & charts...