Run this model with HF Jobs
Run SubMaroon/GigaChat4-37B-A4B-Unstiffened on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs and TRL to fine-tune https://huggingface.co/SubMaroon/GigaChat4-37B-A4B-Unstiffened. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/SubMaroon/GigaChat4-37B-A4B-Unstiffened on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Evaluate on a benchmark
Use HF Jobs to evaluate https://huggingface.co/SubMaroon/GigaChat4-37B-A4B-Unstiffened. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.
Quantize for lower memory use
Use HF Jobs to create a 4-bit version of https://huggingface.co/SubMaroon/GigaChat4-37B-A4B-Unstiffened. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.
Instructions to use SubMaroon/GigaChat4-37B-A4B-Unstiffened with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use SubMaroon/GigaChat4-37B-A4B-Unstiffened with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="SubMaroon/GigaChat4-37B-A4B-Unstiffened", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("SubMaroon/GigaChat4-37B-A4B-Unstiffened", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use SubMaroon/GigaChat4-37B-A4B-Unstiffened with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "SubMaroon/GigaChat4-37B-A4B-Unstiffened" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "SubMaroon/GigaChat4-37B-A4B-Unstiffened", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/SubMaroon/GigaChat4-37B-A4B-Unstiffened
- SGLang
How to use SubMaroon/GigaChat4-37B-A4B-Unstiffened with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "SubMaroon/GigaChat4-37B-A4B-Unstiffened" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "SubMaroon/GigaChat4-37B-A4B-Unstiffened", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "SubMaroon/GigaChat4-37B-A4B-Unstiffened" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "SubMaroon/GigaChat4-37B-A4B-Unstiffened", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use SubMaroon/GigaChat4-37B-A4B-Unstiffened with Docker Model Runner:
docker model run hf.co/SubMaroon/GigaChat4-37B-A4B-Unstiffened
GigaChat4-37B-A4B-Unstiffened
A loosened-up GigaChat4 Instruct, made as a base for further finetuning.
GigaChat4 Instruct is a capable model, but in roleplay and creative writing it tends to play it safe: short replies, generic phrasing, NPCs that wait for the player instead of doing anything. Unstiffened gives back part of what post-training took away from the late MoE experts, so the model writes with more life while keeping the Instruct model's chat format and instruction following.
No training was done. This is pure weight arithmetic between the official Base and Instruct checkpoints.
What was done
For every routed expert in layers 19–31, the weights were moved 40% of the way back toward the Base model:
W = W_instruct + 0.4 · (W_base − W_instruct)
Everything else is untouched Instruct: attention (linear GatedDeltaNet and MLA), the DSA indexer, the router, the shared experts, the dense MLP of layer 0, norms, embeddings and lm_head. The MTP head is also kept from Instruct.
Why the late experts:
- Comparing Base and Instruct layer by layer, the late routed experts are where post-training changed the weights the most.
- In our ablations, reverting attention made things worse, and touching
lm_headmade characters reveal information they shouldn't know yet. Reverting experts in all layers at 0.4 started breaking roles (the model narrating the player's thoughts). Reverting only the late layers kept the early layers, where the model reads the scene, intact — and held up at 0.4 without those failures.
How generation changed
Compared to stock GigaChat4 Instruct, in instant (non-reasoning) mode on roleplay cards:
- More alive scenes. Characters act on their own: block an exit, call over a waiter, bring up something from earlier in the story. Fewer "he waits for your answer" endings.
- More concrete. More details of the room, the people around, the character's history pulled from the card.
- Stronger character voice. Rough characters sound rough, cold ones sound cold — less of the neutral assistant tone underneath.
- Language stability. On mixed-language setups (English card and preset, Russian player messages), it stayed in Russian more consistently than Instruct in our tests.
- Same chat format, same template, no OOC breaks in our tests.
Things to keep in mind:
- It is looser — crude characters get cruder, and explicit content comes up more readily.
- Occasional small slips in Russian grammar (word endings), a bit more often than Instruct.
- Tested on a limited set of cards and first replies. Long-session behavior has not been measured systematically.
Intended use
This is primarily a base for further finetuning — RP/creative LoRAs or RL should start from a less stiff point than stock Instruct. It also works as-is for roleplay if you like a bolder model.
Usage
Same as GigaChat4 Instruct. Use instant mode — pass reasoning: false to the chat template (chat_template_kwargs: {"reasoning": false} in vLLM / SGLang). Reasoning mode was not evaluated.
The repo includes the original modeling_gigachat4.py with one small compatibility patch: if your installed flash-linear-attention doesn't support the zero_centered argument of FusedRMSNormGated, the model falls back to its own reference norm instead of crashing. Weights and outputs are unaffected.
For GGUF conversion, use a llama.cpp build with GigaChat4 support and convert via a BF16 intermediate (--outtype bf16).
License
Inherits the GigaChat4-37B license (non-commercial). See the base model repos.
Кратко по-русски
Это GigaChat4 Instruct, у которого поздние эксперты (слои 19–31) на 40% откачены обратно к базовой модели. Обучения не было, только арифметика над весами официальных Base и Instruct. Всё остальное — внимание, индексатор, роутер, общие эксперты, голова — осталось от Instruct.
В ролевой игре модель стала живее: персонажи сами проявляют инициативу, больше конкретики и характера, на смешанных промптах (английская карточка, русские реплики) реже срывается на английский. Плата — модель стала развязнее и чуть чаще ошибается в окончаниях.
Модель сделана в первую очередь как основа для дальнейшего дообучения. Используйте режим instant (reasoning: false).
- Downloads last month
- 903