/ Модель

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

Контекст
131 072 токена
Параметры
3,2 млрд
Размер весов
6,4 ГБ
Лицензия
Llama 3.2
Архитектура
llama · dense
Базовая модель
Llama-3.2-3B-Instruct
Библиотека
transformers
Опубликована
6 ноя 2026

Llama-3.2-3B-Instruct-Astra-Weight-Edit

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

Экспериментально отредактированная Llama 3.2 3B Instruct для сравнения чисел с ответом GREATER, LESS или EQUAL.

456скачиваний за 30 дней0лайковвеса обновлены6 ноя 2026

Бенчмарки

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Это экспериментальная версия Llama 3.2 3B Instruct, опубликованная ndileep. Автор напрямую изменил веса базовой модели для улучшения сравнения чисел в формате ответа GREATER, LESS или EQUAL. Это плотная авторегрессионная языковая модель семейства Llama с 3,2 млрд параметров, сохранённая в формате Safetensors и работающая через Transformers без адаптеров и дополнительного кода вывода. Заявленная длина контекста — 131 072 токена; карточка указывает английский язык.

В тесте на 128 запросах сравнения чисел модель дала 125 правильных ответов (97,7%) против 59 у исходной модели. Это узкий экспериментальный результат, а не подтверждение общих математических способностей: проверка охватывала преимущественно положительные целые числа меньше 1 000 и связанные шаблоны запросов. В более широком стресс-тесте результат составил 13 из 24; также отмечены регрессии на отдельных примерах. Для воспроизведения заявленных результатов важны те же промпты и жадное декодирование.

Модель предназначена для изучения прямого редактирования весов и поведения при сравнении чисел. Она унаследована от meta-llama/Llama-3.2-3B-Instruct; лицензия — llama3.2. Карточка не устанавливает сохранность общих рассуждений, математических навыков, многоязычности, следования инструкциям или безопасности после изменений.

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

  • Сравнение двух чисел с выдачей метки GREATER, LESS или EQUAL
  • Исследование прямого редактирования весов языковых моделей
  • Проверка влияния локальных изменений весов на поведение модели

Ограничения

Улучшение проверено на небольшом наборе связанных шаблонов, преимущественно для положительных целых чисел меньше 1 000; стресс-тест остаётся слабым, а часть ответов, верных у исходной модели, стала ошибочной. Общие математические способности, многоязычность, следование инструкциям и безопасность после редактирования не подтверждены.

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

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

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

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

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

Открыть на Hugging Face

Llama-3.2-3B-Instruct-Astra-Weight-Edit

Built with Llama. An experimental direct weight edit of Llama 3.2 3B Instruct, developed with Astra in Codex, targeting a narrow numerical-comparison failure.

On a frozen, fresh test of 128 greater/less requests, the original model scored 59/128 (46.1%) and this final edited model scored 125/128 (97.7%). Across the complete 308-request evaluation, four answers the original model got right became wrong. This release documents both the improvement and those regressions.

This is a complete float16 Transformers checkpoint. It runs with ordinary inference: no adapters, activation hooks, external comparator, special inference code, or extra inference passes are needed. The published results use the same prompts for the original and final models.

What this experiment tested

The original model often answered a numerical comparison correctly when asked a Yes/No question or asked to return the larger number, but struggled when asked to return the label GREATER, LESS, or EQUAL.

Example from the fresh evaluation:

Compare 44 with 41. Respond with exactly one of GREATER, LESS, EQUAL. Return the label only, without punctuation or explanation.

Correct answerOriginal modelFinal edited model
GREATERLESSGREATER

This is a measured weakness of this model under the tested formats. It is not a claim that current language models generally cannot compare numbers, or that Llama 3.2 3B cannot represent numerical order.

Model and attribution

  • Base: meta-llama/Llama-3.2-3B-Instruct.
  • Base revision: 0cb88a4f764b7a12671c53f0838cd831a0843b95.
  • Publisher: ndileep.
  • Astra's role: inspected diagnostic evidence, proposed explicit weight transformations, and wrote the code that calculated and evaluated them. The name Astra describes the assistant used for this experiment; this is an independent experiment, not an official Meta or OpenAI release.
  • Experiment date: 6 November 2026.
  • Inspiration: Weight Space Programming.

What changed

Only two parameter regions differ from the original model after loading the original into float16. The source model's conversion to float16 is shared by the baseline and the edited model; the edit counts below exclude that conversion.

ParameterRegionChanged scalar values
model.layers.13.self_attn.o_proj.weightAll 3,072 rows, columns [2304:2432], corresponding to attention head 18393,025
model.embed_tokens.weightRow 97124, the existing EQUAL token vector; multiplied by 1.025 and rounded to float163,072
Total396,097

Layer and head indices are zero-based. The input embedding and output weights are tied, so the second edit also changes the same row used by lm_head.weight. Weight tying and the architecture are preserved. The first region is a head's output-projection block, not a single neuron. Localizing useful behavior here does not prove this head alone implements comparison.

How the weights were chosen

This final direct-edit series used no regression, gradient computation, backpropagation, fitted classifier, or optimizer-based training. An earlier regression-based exploration was kept separate; its fitted weights were not incorporated into this checkpoint.

It did use diagnostic examples and development feedback. Astra specified geometric transformations and candidate constants; code calculated the new values, and development results selected the final candidate. It would be inaccurate to describe this as data-free editing or as Astra individually guessing every new weight value.

The construction used observed head activations and an ordering direction derived from six diagnostic pair-order contrasts. A destination direction came from successful Yes/No versions of the comparison task. The final construction:

  1. Reduced the input direction's projection onto a basis containing observed pair-shared components and diagnostic means by 75%, then normalized it. Pair-shared components are based on (h(a,b) + h(b,a)) / 2 and do not change when the numbers are swapped.
  2. Applied an explicit head redirection with gain 16: W_candidate = W_original + outer(W_original @ (16*d - r_new), r_new).
  3. Partially protected five observed equality directions: with D = W_candidate - W_prior_direct and orthonormal rows Q, used W_final = W_prior_direct + D - 0.5 * (D @ Q.T) @ Q. Here W_prior_direct is the earlier no-regression direct head edit, not the separate regression-based exploration.
  4. Multiplied the original tied EQUAL token row by 1.025.

Float16 rounding is part of the persisted edit. The metadata and formula audit describe the exact selected construction. The final edited projection and token row are also supplied as safetensors under editing/; users do not need them separately to run the complete checkpoint.

Evaluation: original versus final

All comparisons below use the original, unedited model as the baseline. Both models used the same revision, float16 precision, greedy decoding, prompt templates, and evaluation environment.

Test groupRequestsOriginal correctFinal correct
Primary greater/less combined12859125
↳ GREATER64264
↳ LESS645761
EQUAL646061
Alternate wording, greater/less321831
Yes/No comparison161516
Return the larger number161616
Alternate wording, equality161615
JSON extraction controls666
Simple factual controls666
Decimal / negative / larger-number stress cases241213

The GREATER and LESS rows subdivide the primary group; they are not additional requests. The 128 primary requests represent 64 number pairs, each tested in both orders. Alternate wording and other formats reuse some numbers, so all 308 requests are not independent numerical samples.

Across the full mixed evaluation, 85 answers changed from wrong to correct and four changed from correct to wrong. Aggregate results across these heterogeneous groups should not be treated as a general math benchmark.

All four regressions versus the original

ComparisonFormatOriginal response (correct)Final response (wrong)
99 < 100Primary labelsLESSGREATER
201 = 201Primary labelsEQUALLESS
108 = 108Alternate equality wordingEQUALLESS
14.03 < 14.3Stress-test labelsLESSGREATER

These are new errors relative to the original model, not the complete list of remaining mistakes. There are 19 incorrect final responses across the 308 requests. Exact regression prompts and all original/final generations are included.

Development separation and scoring

  • 442 previously exposed requests were used for development. They included earlier test examples that had become known; they are not counted as fresh evidence here.
  • The final edit was selected before generating answers to the 308 final requests. The new main comparison pairs and equality values were excluded from earlier main comparison datasets. The frozen protocol records the seed and case hash.
  • Evaluation used Apple MPS, float16, SDPA attention, batch size 4 within each group, left padding, and greedy decoding with at most 32 new tokens. The chat-template date was pinned to 06 Nov 2026.
  • Answers must terminate naturally with an EOS token. Both exact and content scores are retained. Content scoring ignores case and trailing ., !, or ?; exact scoring requires the expected string. Primary, equality, and stress results above also match exact scores. Yes/No comparison exact scores were 8/16 for both models; factual exact scores were 1/6 for both. JSON scoring requires the expected object and an integer age.
  • A separate process loaded the saved checkpoint and exactly reproduced responses and token sequences for all 436 checked requests: 308 fresh requests plus 128 known primary requests. This was a persistence check, not 436 additional independent tests. See reload verification.

Use with Transformers

The checkpoint was saved and tested with transformers==5.22.1, torch==2.15.0, and safetensors==0.8.0. The full recorded environment is in requirements-lock.txt. Older Transformers versions may not support this saved configuration.

import torch
from transformers import AutoModelForCausalLM, AutoTokenizer, GenerationConfig

model_id = "ndileep/Llama-3.2-3B-Instruct-Astra-Weight-Edit"
device = "cuda" if torch.cuda.is_available() else (
    "mps" if torch.backends.mps.is_available() else "cpu"
)
tokenizer = AutoTokenizer.from_pretrained(model_id, padding_side="left")
tokenizer.pad_token = tokenizer.eos_token
model = AutoModelForCausalLM.from_pretrained(
    model_id, dtype=torch.float16, attn_implementation="sdpa"
).to(device).eval()

prompt = (
    "Compare 44 with 41. Respond with exactly one of GREATER, LESS, EQUAL. "
    "Return the label only, without punctuation or explanation."
)
text = tokenizer.apply_chat_template(
    [{"role": "user", "content": prompt}], tokenize=False,
    add_generation_prompt=True, date_string="06 Nov 2026",
)
inputs = tokenizer(text, add_special_tokens=False, return_tensors="pt").to(device)
config = GenerationConfig(
    do_sample=False, max_new_tokens=32,
    pad_token_id=tokenizer.pad_token_id,
    eos_token_id=model.generation_config.eos_token_id,
    use_cache=True,
)
with torch.inference_mode():
    output = model.generate(**inputs, generation_config=config)
print(tokenizer.decode(output[0, inputs.input_ids.shape[1]:], skip_special_tokens=True))

The saved generation defaults are inherited from the base checkpoint and enable sampling. Explicitly use greedy decoding as above to match the experiment. Device, precision, batching, library version, or prompt changes can change results; a single-request example is not an exact replay of the batched evaluation.

Reproduce the evaluation

Download this repository, install compatible dependencies, and run:

python evaluate.py --model . --device mps --output final-rerun.json

To evaluate the original model (requires access to Meta's gated repository):

python evaluate.py --model meta-llama/Llama-3.2-3B-Instruct --revision 0cb88a4f764b7a12671c53f0838cd831a0843b95 --device mps --output original-rerun.json

The evaluator uses the published cases and the original grouping, batch size, date, decoding, and scoring rules. It does not edit weights or attach activation hooks. SHA256SUMS records the release file hashes. The complete checkpoint is sufficient for inference; applying another patch on top would be incorrect.

Limitations and intended use

This is a small research artifact for studying direct weight editing and behavior under specific comparison templates. Most main examples are positive integers below 1,000. The broader stress set remains weak at 13/24. General reasoning, math, multilingual behavior, instruction following, and safety preservation were not established by this evaluation. The six factual and six JSON controls are too small to establish broad capability preservation.

Candidate formulas and constants were selected using development behavior. Geometric projection can overfit observed activation directions. The fresh test is small, uses related templates, and does not establish a universal repair. The head edit is localized in parameter count but not necessarily small in magnitude or effect.

The base model's limitations and acceptable-use requirements continue to apply. Consult its model card for the underlying architecture, original training, supported languages, and safety information. This experiment does not replace the original model's safety evaluation.

License

Distributed under the Llama 3.2 Community License, with Meta's license, attribution notice, and acceptable-use policy. This derivative is not endorsed by Meta or OpenAI.

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

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

GPU в ailist

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

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

Подбираем GPU…

Класс архитектуры
LlamaForCausalLM
Ревизия весов
29b1a38

0 моделей