# Kuku Yalanji v21.2 guarded hosting bundle

**Serving release:** `v21.2-claude-balanced-replay-guarded-20260714`  
**Weights release:** `v21.2-claude-balanced-replay-v2-candidate`  
**Direction:** English (`eng_Latn`) -> Kuku Yalanji (`gvn_Latn`)  
**Status:** noncommercial research only; not speaker-certified

This release preserves the exact v21.2 model weights and changes only the inference policy. The decoder was selected
on v22 development output, frozen before transfer, and then evaluated once on the exact published v21.2 model. All
14 preregistered transfer gates passed. This is not a retrained model.

The package supports two deployment modes:

- `base/` plus `adapter/`: dynamic PEFT LoRA loading;
- the separate merged archive: standalone Transformers inference.

The adapter is **not compatible with an untouched stock NLLB model**. Load the exact included `base/`, which is the
frozen v12 continuation of `facebook/nllb-200-distilled-1.3B` with the `gvn_Latn` token at ID 256204.

## Required decoding policy

```text
num_beams=1
max_new_tokens=208
no_repeat_ngram_size=4
repetition_penalty=1.10
length_penalty=1.0
forced_bos_token_id=gvn_Latn token ID
```

Do not describe this as generic greedy decoding. Record this serving release ID and the decoding values with every
deployment and evaluation.

## Requirements

- encoder-decoder `M2M100ForConditionalGeneration` / `SEQ_2_SEQ_LM` support;
- PEFT LoRA rank 64 on attention and feed-forward modules;
- custom tokenizer and added-language-token support;
- bounded generation and visible research-preview labeling;
- noncommercial research use under the base model's CC-BY-NC-4.0 license.

## Dynamic-adapter smoke test

```python
import torch
from peft import PeftModel
from transformers import AutoModelForSeq2SeqLM, AutoTokenizer

device = "cuda" if torch.cuda.is_available() else "cpu"
tokenizer = AutoTokenizer.from_pretrained(
    "./adapter",
    src_lang="eng_Latn",
    tgt_lang="gvn_Latn",
)
base = AutoModelForSeq2SeqLM.from_pretrained("./base").to(device)
model = PeftModel.from_pretrained(base, "./adapter").to(device)
model.eval()

text = "<translate> The woman saw the water."
inputs = tokenizer(text, return_tensors="pt", truncation=True, max_length=200).to(device)
target_id = tokenizer.convert_tokens_to_ids("gvn_Latn")

with torch.inference_mode():
    output = model.generate(
        **inputs,
        forced_bos_token_id=target_id,
        num_beams=1,
        max_new_tokens=208,
        no_repeat_ngram_size=4,
        repetition_penalty=1.10,
        length_penalty=1.0,
    )

print(tokenizer.batch_decode(output, skip_special_tokens=True)[0])
```

Expected output:

```text
Jalbu-ngku bana nyajin.
```

## Evidence and limits

On the unchanged weights, tagged synthetic-test corpus chrF++ changed from 53.8374 to 55.7097 while rows with an
orthographic segment repeated at least ten times fell from 37 to 2. The untagged result changed from 53.8142 to
55.7278 with 2 such rows. Bible controls changed by less than 0.08 chrF++, and the 43-row elder diagnostic remained
0/43 exact. No result is speaker certification.

Kuku Yalanji has meaningful reduplication. The four-token no-repeat guard is an engineering safety policy, not a
claim that linguistic reduplication is invalid. Speaker review must check whether the decoder suppresses legitimate
morphology.

Full methods and paired statistics:

- <https://mobtranslate.com/docs/kuku-v22-experiment.html>
- <https://mobtranslate.com/docs/kuku-v21-2-model-guide.html>
- <https://mobtranslate.com/api/v1/models/kuku-yalanji-nllb-lora>

Verify every SHA-256 value before loading. A matching hash and smoke output prove artifact compatibility, not
linguistic correctness. Exact known dictionary entries, approved examples, and recordings remain lookup-first.
