Skip to content
Other

adapt_myscheme_gov_qa

файнтюн Mixtral для ответов на вопросы о законах и госпрограммах Индии

2 min readupdated

Модель представляет собой LoRA-адаптер (небольшую надстройку над базовой моделью) для языковой модели Mixtral-8x7B-Instruct-v0.1, обученный отвечать на вопросы по общественной политике, гражданскому праву и государственным схемам Индии. Она создана в рамках хакатоноподобного конкурса Adaptive Intelligence Challenge и базируется на датасете из почти 28 тысяч синтетических примеров. На выходе модель выдает подробные структурированные ответы на английском языке по юридической и административной тематике. Проект пригодится исследователям и разработчикам, изучающим адаптацию больших моделей под узкие доменные задачи с помощью синтетических данных.

Ключевые особенности

  • Специализация: фокус на вопросах государственного управления, права и социальных программ Индии.
  • Базовая архитектура: построена на базе Mixtral-8x7B-Instruct-v0.1 объемом 46.7 миллиардов параметров с применением техники LoRA.
  • Обучение: использовался датасет myscheme_gov_qa с длинными ответами в формате чата и ранжированием по платформенным бенчмаркам.
  • Предупреждение: модель обучена на синтетических данных без ручной проверки фактов и не заменяет официальные юридические консультации.

Что можно сделать

  • Интеграция адаптера: применить веса LoRA поверх базовой модели Mixtral через библиотеку peft для тестирования в юридических пайплайнах.
  • Анализ синтетики: исследовать датасет и подход к генерации сложных ответов в домене гражданского права.
  • Сравнение ответов: протестировать прирост качества по сравнению с оригинальным Mixtral на тестовой выборке по госуслугам.

Пример

from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel

base = "mistralai/Mixtral-8x7B-Instruct-v0.1"
tok = AutoTokenizer.from_pretrained(base)
model = AutoModelForCausalLM.from_pretrained(base, device_map="auto")
model = PeftModel.from_pretrained(model, "fiersist/adaption_myscheme_gov_qa")
ПодробнееБенчмарки: win rate платформенного AI-судьи вырос с 19 до 81 процента по сравнению с базовой моделью.
Железо: базовой модели требуется значительный объем VRAM или квантование из-за 46.7 миллиардов параметров.
Ограничения: модель может выдавать устаревшую или вымышленную информацию, не подходит для реальных юридических решений.
Обучение: 3 эпохи, метод SFT с LoRA (r=32, alpha=64) на модулях q_proj, k_proj, v_proj, o_proj.
Discuss TelegramReport 0 1

Will it run?

Only with RAM offload

Even 4-bit is larger than your VRAM. Some layers can stay in system RAM (llama.cpp, ComfyUI), but it will be several times slower.

  • BF16weights 87 GB · ready files96 GB
  • FP8 / INT8recommendedweights 44 GB48 GB
  • 4-bitweights 25 GB28 GB

Tip: go 8-bit.FP8 / INT8 is within about a percent of full precision in quality, takes half the memory and runs faster on RTX 40/50 and H100. Full precision only pays off for fine-tuning.

This is a LoRA: counted together with its base model Mixtral-8x7B-Instruct-v0.1.

Estimate: weights plus working memory. Long videos, high resolutions and long contexts need more.

Run it on Massed Compute

The script downloads the model to the rented machine. How to run it is in the model card.

  1. 1. Rent a machine with a fitting GPU

    Open Massed Compute
  2. 2. Paste the script into the machine's terminal

    Connect over SSH (the Massed Compute panel shows the command) or open a terminal on the machine's desktop.

    HF_TOKEN / CIVITAI_TOKENThe script starts with token lines: paste yours between the quotes. The Hugging Face token is for gated models, the Civitai one for Civitai models.

    # fiersist/adaption_myscheme_gov_qa
    # ===== Tokens: paste yours between the quotes =====
    export HF_TOKEN=""        # huggingface.co/settings/tokens, for gated models
    # ==========================================
    mkdir -p ~/models
    curl -LsSf https://astral.sh/uv/install.sh | sh
    source "$HOME/.local/bin/env"
    uv tool install "huggingface_hub[cli]"
    hf download mistralai/Mixtral-8x7B-Instruct-v0.1 --local-dir ~/models/Mixtral-8x7B-Instruct-v0.1
    hf download fiersist/adaption_myscheme_gov_qa --local-dir ~/models/adaption_myscheme_gov_qa
    # The model is in ~/models. How to run it is in the model card (link above).
  3. 3. Use it

    The model is in ~/models. How to run it is in the model card (link above).

Stop the machine in the panel when you are done: it bills by the minute while it runs.

How to speed it up

Picked for this model type. Choose your hardware above to see what fits you exactly.

  • FlashAttention 44.0.0b42from December 2, 2026new release

    fastest exact attention on B200

    Kernels for Blackwell (beta). Exact attention without quantisation — fine for everything, LLMs included.

    How to enable: pip install flash-attn-4; vLLM and SGLang pick it up themselves.

    Earlier generations (2)
    • FlashAttention 3 — The Hopper (H100/H200) version with FP8.
    • FlashAttention 2 — The standard for RTX 30/40/50 and A100: exact attention without the memory cost of long contexts.
  • torch.compile2.15.0from October 28, 2026

    10–30% for free

    Compiles the model for your GPU. Slower first run, faster afterwards.

    How to enable: model = torch.compile(model); in ComfyUI the TorchCompileModel node.

Model family

Requires the base model

mistralai/Mixtral-8x7B-Instruct-v0.1

This model is a LoRA / adapter. Download the base model first, then load this one on top.

  1. Mixtral-8x7B-v0.1family root
  2. Mixtral-8x7B-Instruct-v0.1
  3. adaption_myscheme_gov_qa

New posts about versions of Mixtral-8x7B-v0.1 (quants, finetunes, LoRAs) will show up under the bell.

Quantised versions 12All on Hugging Face
Fine-tunes 12All on Hugging Face
LoRAs and adapters 4All on Hugging Face
Merges 12All on Hugging Face

About the model

fiersist/adaption_myscheme_gov_qa
Author
fiersist
Category
Other
Released
Posted

On NeyroLearn

Hugging Face

10

Ask AI about this model

Generated by external AI (Google Gemini) · chat stays only in this tab · Privacy Policy

Comments