/ Модель

Характеристики

Контекст
131 072 токена
Размер весов
59,6 ГБ
Лицензия
Apache 2.0
Архитектура
muse_glimmer · dense
Базовая модель
Muse-Glimmer-30B
Библиотека
transformers
Опубликована
13 окт 2026

Muse-Glimmer-30B-rego

Генерация текстаТекст → текст4 профессии

Модель SASVA AI для генерации политик OPA Rego по требованиям соответствия и имени пакета.

143скачиваний за 30 дней0лайковвеса обновлены13 окт 2026

Бенчмарки

Как модель справилась с задачами пользователей ailist и что о ней публикуют открытые лидерборды

Тесты пользователейпока нет

Никто ещё не опубликовал тест этой модели. Соберите бенчмарк из своих задач — результат появится здесь.

  1. Добавьте модель в бенчмарк

    Вместе с другими моделями категории «Текст» — сравнение идёт внутри одной категории.

  2. Опишите свои задачи

    Напишите запросы, при необходимости приложите файлы и эталонные ответы.

  3. Запустите и опубликуйте

    Модели ответят на каждую задачу, судья оценит ответы. Опубликованный результат появится на этой странице.

Публичные оценки

Из открытых лидербордов. Сравнивайте результаты одного теста при одинаковых условиях — отсутствие оценки не значит, что модель хуже.

В подключённых источниках результатов для этой модели пока нет.

Что умеет модель

Описание составлено по карточке модели и метаданным Hugging Face

Muse-Glimmer-30B-rego — слитая дообученная модель команды SASVA AI Model Cognition Labs на базе meta-models/Muse-Glimmer-30B. Она генерирует политики Open Policy Agent (Rego) по текстовому требованию соответствия и имени пакета; при необходимости можно передать набросок JSON-структуры входных данных. Модель рассчитана на инженеров, создающих policy-as-code для описания ресурсов Terraform, Kubernetes и облачной инфраструктуры.

Модель использует плотную архитектуру Muse Glimmer с 29,78 млрд параметров, включая языковую часть на 27,85 млрд параметров и башню зрения на 1,92 млрд. Адаптер обучался методом SFT с 4-битной базой, а затем был объединён с базовыми весами; опубликованы safetensors и варианты GGUF Q4_K_M и Q8_0. Для ожидаемого результата важно следовать заданному шаблону промпта, оставить ход ассистента открытым и генерировать жадно. Карточка указывает лицензию Apache-2.0.

Модель предназначена для текстового ввода и генерации кода Rego. Авторы предупреждают, что сгенерированные политики — лишь отправная точка: их следует проверять и тестировать на положительных и отрицательных случаях, поскольку правдоподобная или компилирующаяся политика может ничего не запрещать. Для загрузки через Transformers требуется версия 5.15 или новее и класс AutoModelForImageTextToText; для GGUF нужен runtime с поддержкой архитектуры muse-glimmer.

Сценарии применения

  • Создание Rego-правил из текстовых требований соответствия
  • Генерация политики OPA для проверки ресурсов Terraform
  • Подготовка правил для Kubernetes-манифестов
  • Создание политик для документов облачных ресурсов
  • Формирование Rego-кода с учётом заданной JSON-структуры входных данных

Ограничения

Результаты зависят от соблюдения точного шаблона промпта; универсальный чатовый формат может давать неподходящий вывод. Сгенерированные политики нужно проверять и тестировать, поскольку они могут компилироваться, но не обеспечивать требуемый запрет.

Для каких профессий подходит4

Разделы каталога профессий, в задачах которых используется эта модель

Все профессии

Карточка модели

README от автора на Hugging Face, как он его опубликовал

Открыть на Hugging Face

Muse-Glimmer-30B-rego

Writes Open Policy Agent (Rego) policies from a plain-language compliance control and a target package name. Merged fine-tune for engineers authoring policy-as-code against Terraform, Kubernetes and cloud resource documents.

This is a merged fine-tune of meta-models/Muse-Glimmer-30B: the LoRA adapter has been fused into the base weights with merge_and_unload(), so it loads as an ordinary transformers checkpoint with no PEFT dependency. It was trained with 4-bit-quantized-base LoRA via TRL SFT.

Model details

Developed bySASVA AI Model Cognition Labs (MCL) Team
Base modelmeta-models/Muse-Glimmer-30B @ a4e59da52a7bc87ae7251dd5545c0dd437c44b68
Base parameters29.78B total — 27.85B language model, 1.92B vision tower
Architecture familymuse_glimmer (MuseGlimmerForConditionalGeneration) — 52 layers, hidden 6656, GQA 32 Q-heads / 2 KV-heads, vocab 202,048
AdaptationLoRA (r=16, alpha=32, dropout=0.05), merged into the base
Trainable modulesattention projections only: q_proj, k_proj, v_proj, o_proj — 208 modules (52 layers × 4), 416 adapter tensors
Untouchedvision tower, vision adapter, vision projection, every MLP, embeddings, lm_head, every norm
Training method4-bit NF4 quantized base, bf16 LoRA on attention projections, bf16 compute
Precision in this repobfloat16, unquantized, plus two GGUF quants
Weights13 safetensors shards, 59,553,253,376 B — 55.5 GiB
Context length131,072 (base capability); trained at 2,048
LanguageEnglish prompts, Rego targets
LicenseApache-2.0, inherited from the base model

The config here carries no quantization_config — 4-bit NF4 was a training-time choice, not a property of these weights.

Every one of the 416 adapter tensors sits on model.language_model. The vision tower is bit-identical to the base in these merged weights, verified by tensor comparison rather than assumed; so are all MLP projections.

Intended use

Direct use. Given a written control requirement and the Rego package the policy must declare, emit the policy: the package line, any imports, and the named rule, as raw Rego with no prose and no markdown fences.

The prompt format is part of the contract. The model was trained on one exact rendering; see How to get started. Prompting it as a general chat model will not reproduce its behaviour.

Not a security control. Generated policies are a starting point. Review them and run them against your own two-sided tests before they gate anything — a policy that compiles and reads plausibly can still deny nothing. See Evaluation for where this model is and is not competent.

How to get started

Prompt format

The model uses the base model's ATEM chat template. Training rendered each sample as (newlines shown literally):

<|start|>system<|message|>{SYSTEM}<|eot|><|start|>user<|message|>{INSTRUCTION}

package: {PACKAGE}
rule: {RULE}
input shape:
{JSON_SHAPE_SKETCH}<|eot|><|start|>assistant to=user<|message|>{REGO}<|eot|>

Three things follow from this, and all three bite in practice:

  1. The user turn is the control requirement, then package: and rule: on their own lines, then an optional input shape: JSON sketch. The package name and rule name are not decoration — they are what the generated policy must declare. The input shape block measurably helps: it tells the model which resource type and attribute names to reference.
  2. The assistant turn is left open by add_generation_prompt=True. The rendered prompt ends at <|start|>assistant, not at <|message|>. See The assistant turn is left open — this is the single most common way to get wrong-looking output from this model.
  3. Decode greedily. The task has one correct behaviour, not a distribution of styles; the model was both trained and evaluated with sampling off.

System prompt

This is the exact system prompt the adapter was trained under, taken from the training configuration. Changing it moves the model off its trained contract. It is also shipped as system and as the SYSTEM block of Modelfile.

You are a Rego policy author. Given a compliance control requirement in natural language and a target Rego package name, output a complete, correct Open Policy Agent policy that denies non-compliant inputs and allows everything else. Output ONLY valid Rego source code declaring the specified package and defining the appropriate deny rule — no markdown, no commentary, no explanation.

Loading it

from_pretrained requests files by name, so it fetches the config, tokenizer and safetensors shards only — the GGUFs in this repo cost transformers users nothing. If you instead download the repo by hand, filter it, or you will pull all 99 GB:

hf download SASVAAI/Muse-Glimmer-30B-rego --exclude "*.gguf" --local-dir ./Muse-Glimmer-30B-rego

Requires transformers >= 5.15, which is where model_type: muse_glimmer landed. Two loader notes, both verified on this repo:

  • AutoModelForCausalLM cannot load this architecture — it raises Unrecognized configuration class. Use AutoModelForImageTextToText, which is what the multimodal config maps to.
  • Use AutoTokenizer, not AutoProcessor. AutoProcessor also constructs the image processor and fails with Could not load any image processor class ... Missing optional dependencies: torchvision. For a text-only task the tokenizer is sufficient and drops the dependency.
import torch
from transformers import AutoModelForImageTextToText, AutoTokenizer

MODEL = "SASVAAI/Muse-Glimmer-30B-rego"

tokenizer = AutoTokenizer.from_pretrained(MODEL)
model = AutoModelForImageTextToText.from_pretrained(
    MODEL, dtype=torch.bfloat16, device_map="auto",
    attn_implementation="sdpa",   # "flash_attention_2" if flash-attn is installed
)
model.eval()

SYSTEM = (
    "You are a Rego policy author. Given a compliance control requirement in "
    "natural language and a target Rego package name, output a complete, correct "
    "Open Policy Agent policy that denies non-compliant inputs and allows "
    "everything else. Output ONLY valid Rego source code declaring the specified "
    "package and defining the appropriate deny rule — no markdown, no commentary, "
    "no explanation."
)

user = (
    "Write an Open Policy Agent (Rego) policy that enforces this control:\n"
    "S3 buckets must have encryption at rest enabled.\n\n"
    "package: builtin.aws.s3.aws0088\nrule: deny"
)

messages = [{"role": "system", "content": SYSTEM}, {"role": "user", "content": user}]
text = tokenizer.apply_chat_template(
    messages, tokenize=False, add_generation_prompt=True,
)
text += " to=user<|message|>"          # closes the turn — see the section below

enc = tokenizer(text, return_tensors="pt", add_special_tokens=False).to(model.device)
out = model.generate(**enc, max_new_tokens=1536, do_sample=False)
print(tokenizer.decode(out[0][enc["input_ids"].shape[-1]:], skip_special_tokens=True))

Run locally with Ollama

Both GGUFs ship in this repo, so there is nothing to build. Either of these works:

# A. One command — Ollama pulls the GGUF straight from this repo
ollama run hf.co/SASVAAI/Muse-Glimmer-30B-rego

# B. Or fetch the GGUF plus the Modelfile and build the tag locally
hf download SASVAAI/Muse-Glimmer-30B-rego \
    --include "*Q4_K_M.gguf" "Modelfile" --local-dir .
ollama create muse-glimmer-rego -f Modelfile
ollama run muse-glimmer-rego

Either way you download 15.8 GiB, not the 55.5 GiB of bf16 safetensors — Ollama only fetches the GGUF.

The two paths are not quite equivalent. ollama run hf.co/... never reads a Modelfile. The Hub serves a GGUF repo to Ollama through its own OCI-compatible registry: it picks the Q4_K_M GGUF as the model layer and attaches this repo's params and system files as the parameter and system-prompt layers. Those two files are kept byte-equivalent to the Modelfile's PARAMETER lines and SYSTEM block, so both routes land on the same greedy, system-prompted configuration. Path B is the one to use if you want to edit any of it, or to run the Q8_0 instead.

Requirements

A runtime whose llama.cpp knows the muse-glimmer architecture: llama.cpp PR #26841, first released in b10353. Older runtimes refuse to load with unknown model architecture: 'muse-glimmer'. Verified here on Ollama v0.40.3.

Verified transcript

Built and run end-to-end on this host from the GGUF in this repo (Ollama v0.40.3, 8 × H100 80GB, 48 CPU threads):

ollama create muse-glimmer-rego -f Modelfile     # real 0m32.470s
ollama show muse-glimmer-rego
  Model
    architecture        muse-glimmer
    parameters          27.9B
    context length      131072
    embedding length    6656
    quantization        Q4_K_M

  Capabilities
    tools
    completion

  Parameters
    num_ctx        8192
    num_predict    1536
    stop           "<|eot|>"
    stop           "<|eom|>"
    temperature    0
    top_k          1

parameters 27.9B is the language tower alone (27.85B measured on the safetensors), not the 29.78B of the full checkpoint. The vision tower is not in the GGUF — see Building your own GGUF.

Then the S3-encryption prompt above, through /api/chat with "options": {"num_thread": 48}:

done_reasonstop
prompt_eval_count137 tokens
prompt_eval_duration0.86 s
eval_count87 tokens
eval_duration1.12 s (≈77.5 tok/s, GPU-offloaded)
load_duration10.36 s
total_duration12.36 s

All seven figures are from one cold call against a freshly started server; a warm repeat returns in ~1.4 s, the difference being load_duration.

Three things worth noting, all confirmed on this build:

  • prompt_eval_count is 137 — the same count the transformers tokenizer produces for the same system+user messages. (The Python snippet above reads 140 because it appends the three-token to=user<|message|> opener by hand; Ollama's template emits those same three tokens on the other side of the boundary.) The Modelfile SYSTEM block plus the GGUF's embedded chat template reconstruct the training-time prompt exactly.
  • num_ctx is load-bearing. Ollama sizes the default context from available VRAM and will pick 131,072 on a large host. The Modelfile pins 8,192; the model was trained at a sequence length of 2,048 and the longest gold policy in the validation split is ~2,348 tokens.
  • Use /api/chat, not /api/generate. See the next section.

The assistant turn is left open

This is the one thing that silently produces wrong-looking output. It is worth reading before you wire this model into anything that parses its answers.

Muse-Glimmer's ATEM template does not close the assistant turn. A complete turn is <|start|>assistant to=user<|message|>CONTENT<|eot|>, but add_generation_prompt=True stops at <|start|>assistant. The model then generates the routing channel itself, skip_special_tokens strips only the special <|message|>, and the plain text to=user is left glued to the first line:

 to=userpackage builtin.aws.s3.aws0088

Any parser keyed on a leading package then fails. Measured behaviour by entry point, all on this repo's artifacts:

Entry pointEmits to=user?Why
ollama run / /api/chatnoOllama applies the embedded chat template and closes the turn
/api/generate with a raw promptyesno template is applied — you get the raw completion
llama-cli -sys ... -p ...nollama.cpp applies the template
transformers + apply_chat_template(add_generation_prompt=True)yesthe template leaves the turn open

For the two that leak it, either append " to=user<|message|>" to the rendered prompt (what the Python snippet above does) or strip a leading to=user from the decoded text. Both were verified to give identical, clean output.

Building your own GGUF (optional)

Needed only if you want a quantization other than the shipped Q4_K_M and Q8_0.

git clone https://github.com/ggml-org/llama.cpp && cd llama.cpp
pip install -r requirements/requirements-convert_hf_to_gguf.txt

python convert_hf_to_gguf.py /path/to/Muse-Glimmer-30B-rego \
    --outfile Muse-Glimmer-30B-rego-bf16.gguf --outtype bf16

cmake -B build -DGGML_NATIVE=ON -DCMAKE_BUILD_TYPE=Release
cmake --build build --config Release -j
./build/bin/llama-quantize Muse-Glimmer-30B-rego-bf16.gguf \
    Muse-Glimmer-30B-rego-Q4_K_M.gguf Q4_K_M 64

Note the argument order: llama-quantize [options] IN OUT TYPE [nthreads]. There is no --threads flag; passing one prints the usage block and exits 1.

Measured on this repo's weights:

QuantSize on diskBPWTensorsQuantize time (64 threads)
bf1655,725,513,952 B — 51.9 GiB16.00731—
Q8_029,612,960,992 B — 27.6 GiB8.5073139.6 s
Q4_K_M16,935,294,432 B — 15.8 GiB4.8673161.3 s

llama-quantize reported model size = 53131.48 MiB → quant size = 16138.25 MiB for Q4_K_M. Other K-quants land between these rows; the three above are the only ones actually built and run here, so they are the only ones quoted.

The GGUFs carry 731 tensors against 1,436 in the safetensors — the converter emits the text model only. The vision tower is a separate --mmproj run and is not part of this repo's GGUFs, which is consistent with the vision tower never having been trained. If you need image input, use the base model's mmproj.

Unlike some merged checkpoints, nothing is dropped by the merge here: the safetensors index carries the same 1,436 tensors as the base, so conversion has everything it needs. That was checked, not assumed.

Stop tokens

The Modelfile's explicit stop "<|eot|>" / stop "<|eom|>" lines are belt-and-braces. The completion above ended on done_reason: "stop" with the model emitting <|eot|> itself.

Quantization fidelity

The S3-encryption prompt was run under greedy decoding (temperature 0 / top_k 1) against all three artifacts in this repo: the bf16 safetensors via transformers, and both GGUFs via Ollama /api/chat.

ArtifactOutput tokensCharsSHA-1 of output
bf16 safetensors813289e1934b9d3c0
Q8_0 GGUF843289e1934b9d3c0
Q4_K_M GGUF87338f56ebd492c0e
  • Q8_0 is byte-identical to bf16 on this prompt — same 328 characters, same SHA-1. The count differs by exactly 3 because Ollama's eval_count includes the three channel tokens the model emits ( to=user<|message|>, measured at 3 tokens), which the transformers run supplied in the prompt instead. <|eot|> is not counted.

  • Q4_K_M is not. It produced a semantically different policy, not a whitespace difference:

    - some bucket in input.aws.s3.buckets
    - not bucket.serverSideEncryption.enabled
    + some bucket in object.get(input.aws.s3, "buckets", {})
    + bucket.serverSideEncryption == "disabled"
    

    The Q4_K_M version tests a string equality where the bf16 version tests a boolean field, and the two do not decide the same way on the same input.

  • bf16 greedy decoding was confirmed reproducible: three consecutive generations in one process produced the identical SHA-1.

One prompt is one prompt, and exact_match was measured on bf16 only. But on the one case compared, Q4_K_M changed the behaviour of the generated policy — which is exactly what this model's metric is about. If you are scoring or gating on output correctness, prefer Q8_0; Q4_K_M is the one that fits a 24 GB card.

Training details

Data

Train2,923 pairs
Validation706 pairs
Max sequence length2,048 tokens

Each pair is (control requirement, target package + rule + input shape, gold Rego policy), mined from five permissively licensed upstream repositories. Every retained pair was validated by running the gold policy against its own gold tests through the same harness used for scoring, so a sample exists only where the oracle is known to work on it.

SourceLicenceTrainVal
Checkmarx/kicsApache-2.01,435109
carbonetes/brainiacApache-2.0918528
aquasecurity/trivy-checksMIT45858
gopalApache-2.0722
open-policy-agent/gatekeeper-libraryApache-2.0409

The split is group-aware on source so near-identical checks cannot straddle it. It was not stratified by source, which is why the validation split is 75% brainiac while the training split is 49% KICS — see Evaluation, where that skew dominates the headline number.

The control requirement is taken from each policy's upstream METADATA title/description, which sometimes names the exact field the policy checks. That is realistic for a written control, but it makes the task easier than open-ended policy authoring.

Method

4-bit QLoRA (bitsandbytes NF4) with a LoRA adapter over the language model only, attention projections only. Supervised fine-tuning on completions and prompts together — standard causal LM loss over the full rendered sequence. 8 × H100 80GB, torchrun --nproc_per_node 8.

The adapter targets q_proj, k_proj, v_proj, o_proj across all 52 layers. A regex exclude_modules pattern keeps PEFT's suffix matching off the vision tower — without it, q_proj would also match model.vision_tower.layers.N.attn.q_proj and silently adapt the 1.92B ViT. That resolves to 208 modules, all in the language model, none in the vision tower. MLP projections were not trained.

Final hyperparameters

lora_r16
lora_alpha32
lora_dropout0.05
learning_rate2e-4
lr_scheduler_typecosine
num_train_epochs2
per_device_train_batch_size1
gradient_accumulation_steps4
Effective batch size32 (1 × 4 × 8 GPUs)
warmup_ratio0.05
weight_decay0.01
max_length2,048
Precisionbf16, gradient checkpointing on, sample packing off
Total optimizer steps182

DoRA, rsLoRA, LoRA+, NEFTune, Liger kernels and PiSSA/LoftQ initialisation were not used; the adapter is plain LoRA with default initialisation.

Observed training metrics

train_loss0.38209457711859063
eval_loss0.35263916850090027
train_runtime1,000.16 s (~16 m 40 s)
train_samples_per_second5.803
train_steps_per_second0.182
total_flos5.922349678120141e+17
Final train mean_token_accuracy0.9339
Final eval mean_token_accuracy0.9182
Tokens seen3,429,554

Evaluation

The primary metric is behavioural, not textual. Despite the name, exact_match here is not string equality against a reference policy. Each generated policy is written into a sandboxed workspace alongside the gold test file and the upstream Rego library bundle, and executed:

opa test <workspace> --format json --capabilities <allowlist>

A sample scores 1.0 only if the policy compiles and every one of its gold test cases passes. A policy that is textually nothing like the reference but allows and denies the same inputs scores correct; a policy that looks almost identical but inverts a condition scores 0. The gold tests are two-sided (test_deny_* and test_allow_*), so a degenerate "deny nothing" policy cannot pass. Checkmarx KICS queries are scored by a second oracle — the KICS engine itself, over positive* IaC fixtures that must fire and negative* fixtures that must not.

Measured on these merged bf16 weights, over the full 706-row held-out validation split, greedy decode, max_new_tokens=1536:

MetricValueMeaning
exact_match0.3329235/706 policies passed every gold test
test_case_rate0.58251,100/1,752 individual gold test cases passed
compile_rate0.9278655/706 policies were valid, compiling Rego

Read the per-source breakdown before trusting the headline

Sourceexact_matchcompile_raten
carbonetes/brainiac (Terraform)0.4260.991528
aquasecurity/trivy-checks0.1380.39758
Checkmarx/kics0.0000.954109
open-policy-agent/gatekeeper-library0.0000.3339
gopal1.0001.0002

225 of the 235 passes (96%) are brainiac. Because the split was not stratified, the validation set is 75% brainiac and the headline number is close to a brainiac-only score. KICS is the sharpest failure: 104 of 109 KICS policies compile but none produce correct findings, despite KICS being the largest share of the training set at 1,435 rows. Treat anything outside Terraform-style resource checks as unvalidated.

There is no measured base-model baseline on this validation set. The uplift from fine-tuning is therefore not quantified here, and should not be inferred from the numbers above.

Known limits beyond the table: the corpus is dominated by two projects with their own conventions (result.new, fail[]/pass[] contracts, lib/cloud/* helpers), and output follows those conventions. The corpus also mixes Rego v0 and v1, so output may need --v0-compatible depending on which idiom the model picks for a given prompt.

Environmental impact

Reported rather than estimated, since the hardware is shared and per-job power was not instrumented:

Hardware8 × NVIDIA H100 80GB
Training runtime1,000 s (~0.28 h)
total_flos5.92e+17

Carbon emitted was not measured; the grid region and PUE of the host are not known to the authors.

Framework versions

PEFT0.18.1
TRL1.0.0
Transformers5.17.0
PyTorch2.5.1+cu121
Datasets4.8.4
Tokenizers0.23.2
Accelerate1.13.0
bitsandbytes0.49.2
Ollama (verification)0.40.3
llama.cpp (conversion)1b70350

muse_glimmer requires transformers >= 5.15; it is not present in earlier releases.

Citation

Cite this model, the base model and the training stack:

@misc{muse_glimmer_30b_rego_2026,
  title  = {Muse-Glimmer-30B-rego},
  author = {{SASVA AI Model Cognition Labs (MCL) Team}},
  year   = {2026},
  url    = {https://huggingface.co/SASVAAI/Muse-Glimmer-30B-rego}
}

@misc{muse_glimmer_30b,
  title  = {Muse Glimmer 30B},
  author = {{Meta Superintelligence Lab}},
  year   = {2026},
  url    = {https://huggingface.co/meta-models/Muse-Glimmer-30B}
}

@misc{trl,
  title  = {TRL: Transformer Reinforcement Learning},
  author = {von Werra, Leandro and others},
  year   = {2020},
  url    = {https://github.com/huggingface/trl}
}

Как запустить

На своей GPU в ailist. Цена — по текущим предложениям провайдеров

GPU в ailist

Универсальный рантайм · transformers

Можно запустить

Подбираем GPU…

Класс архитектуры
MuseGlimmerForConditionalGeneration
Ревизия весов
aedd044

0 моделей