Run this model with HF Jobs
Run olaverse/YellowMIST-Encoder-15M-AP 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 to fine-tune https://huggingface.co/olaverse/YellowMIST-Encoder-15M-AP. 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/olaverse/YellowMIST-Encoder-15M-AP 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.
Instructions to use olaverse/YellowMIST-Encoder-15M-AP with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use olaverse/YellowMIST-Encoder-15M-AP with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("fill-mask", model="olaverse/YellowMIST-Encoder-15M-AP")# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForMaskedLM model = AutoModelForMaskedLM.from_pretrained("olaverse/YellowMIST-Encoder-15M-AP", device_map="auto") - Notebooks
- Google Colab
- Kaggle
YellowMIST-Encoder-15M-AP (from base-latn-asia-pacific-dew-1-enc-hybrid-full-s0)
Browse filesFiles changed (12)
- README.mdAdded+197
- config.jsonAdded+40
- dew/__init__.pyAdded+23
- dew/configuration_dew.pyAdded+144
- dew/export.pyAdded+87
- dew/modeling_dew.pyAdded+555
- dew/ops.pyAdded+121
- dew/presets.pyAdded+62
- eval.jsonAdded+346
- model.safetensorsAdded+3
- probes.csvAdded+98
- vocab.jsonAdded+1
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197---license: apache-2.0library_name: transformerspipeline_tag: fill-masktags: [yellowmist, dew, character-level, encoder, multilingual, on-device, fill-mask]---
# YellowMIST-Encoder-15M-AP
**YellowMIST Encoder** is a family of tiny character-level encoders to fine-tune for on-device text tasks:code-switching detection, word segmentation, autocorrect, restoring tone marks, punctuation and capitals,small NER. Each encoder covers one script or region group. This one covers **Asia-Pacific (Latin script)**:111 languages.
- **15.0M parameters**, 60 MB in fp32 (about 15 MB once quantised to int8; that file is not exported yet)- Reads **characters** (NFC code points), so it needs no tokenizer and handles any spelling or tone marks in its script- Sees text in **both directions**, like BERT. It labels or fixes text; it does not generate it.
## Architecture
Dew hybrid encoder: 6 layers, `GGAGGA`. That is 4 bidirectional Gated DeltaNet layers (a fixed-size memory readforwards and backwards) and 2 attention layers, with a dense SwiGLU feed-forward block in each layer. Hidden size 320.Context of 512 characters in training; it runs on longer text. The first token of a text is its language tag (`<|lang:xxx_Xxxx|>`).
Why this layout: in a 3-seed pilot on the West Africa data, it beat a same-size transformer encoder on every test,by more than the seed-to-seed spread:
| Model (15M, same data and steps, 3 seeds) | masked chars | mark restoration | punctuation F1 | capitals F1 ||---|---|---|---|---|| **Dew hybrid (this architecture)** | **65.89 ± 0.13** | **82.89 ± 0.04** | **36.67 ± 0.35** | **59.07 ± 0.59** || Transformer encoder | 64.43 ± 0.19 | 82.44 ± 0.02 | 34.33 ± 1.10 | 57.07 ± 1.44 |
## Training
- Objective: masked characters. Spans of 3 characters are hidden at 15% of positions, and the model fills them in.- Data: web and chat text from the YellowMIST corpus, licence-screened. 7.14B unique characters in this group.- Trained on 8.0B characters (122,070 steps of 128 × 512). Small languages repeat at most 4 times; English is capped at a quarter of the training text.
## Results
Held-out documents (never trained on).
- **Masked characters filled in correctly: 70.4%**- Short fine-tune probes: mark restoration 92.9% words right (mean over 12 languages), punctuation F1 38.9, capitals F1 59.1
| Language | masked chars % | mark restoration % | punctuation F1 | capitals F1 | unique chars ||---|---|---|---|---|---|| `vie_Latn` | 75.2 | 81.0 | 26.0 | 64.1 | 339M || `ind_Latn` | 84.3 | – | 38.2 | 67.0 | 308M || `zsm_Latn` | 83.5 | – | 40.9 | 69.3 | 312M || `fil_Latn` | 79.6 | – | 38.8 | 72.7 | 354M || `uzn_Latn` | 79.4 | – | 52.6 | 50.5 | 325M || `jav_Latn` | 69.9 | – | 16.5 | 66.3 | 256M || `ceb_Latn` | 83.7 | – | 45.9 | 69.2 | 296M || `bew_Latn` | 70.7 | – | 28.3 | 38.8 | 294M || `sun_Latn` | 80.0 | 97.7 | 29.0 | 52.0 | 296M || `hin_Latn` | 74.9 | – | 57.2 | 48.5 | 239M || `mww_Latn` | 81.7 | – | 33.8 | 68.6 | 291M || `mri_Latn` | 79.2 | 97.5 | 42.4 | 62.7 | 288M || `haw_Latn` | 82.4 | 98.9 | 47.7 | 71.8 | 277M || `hif_Latn` | 78.0 | – | 50.7 | 58.4 | 205M || `smo_Latn` | 79.2 | 99.6 | 32.6 | 68.4 | 297M || `lus_Latn` | 72.8 | – | 53.1 | 79.1 | 252M || `nrm_Latn` | 81.6 | 95.4 | 28.8 | 67.9 | 112M || `cnh_Latn` | 75.0 | – | 57.3 | 76.8 | 103M || `urd_Latn` | 73.5 | – | 42.4 | 47.0 | 85M || `tel_Latn` | 70.6 | – | 45.3 | 43.1 | 76M || `uig_Latn` | 68.0 | 96.3 | 57.0 | 18.9 | 70M || `tet_Latn` | 78.7 | 94.9 | 45.2 | 75.7 | 46M || `ben_Latn` | 66.9 | – | 26.3 | 38.0 | 38M || `hil_Latn` | 80.3 | – | 67.9 | 73.0 | 31M || `rhg_Latn` | 98.3 | – | 24.5 | 63.0 | 206M || `ctd_Latn` | 72.1 | – | 66.6 | 80.6 | 32M || `kha_Latn` | 73.0 | – | 27.9 | 48.5 | 29M || `ilo_Latn` | 67.7 | – | 51.2 | 82.8 | 71M || `fij_Latn` | 79.1 | – | 43.1 | 74.3 | 19M || `iba_Latn` | 80.3 | – | 66.6 | 86.0 | 28M || `ban_Latn` | 73.4 | – | 27.5 | 67.0 | 32M || `cfm_Latn` | 71.3 | – | 50.1 | 77.2 | 18M || `tam_Latn` | 70.4 | – | 43.5 | 52.0 | 23M || `bcl_Latn` | – | – | – | – | 12M || `pan_Latn` | 71.5 | – | 32.5 | 73.2 | 11M || `kac_Latn` | 76.5 | – | 36.8 | 64.8 | 24M || `bbc_Latn` | 71.4 | – | 37.1 | 44.5 | 11M || `nan_Latn` | 57.6 | 57.5 | 24.6 | 61.9 | 6M || `tcz_Latn` | 64.4 | – | 56.0 | 79.3 | 5M || `pck_Latn` | 63.5 | – | 46.8 | 64.5 | 3M || `mal_Latn` | 61.5 | – | 24.3 | 38.4 | 10M || `san_Latn` | 50.0 | 100.0 | 0.0 | 0.0 | 29M || `gom_Latn` | 61.3 | – | 40.5 | 56.8 | 6M || `ium_Latn` | 66.3 | – | 0.8 | 69.9 | 9M || `pam_Latn` | 90.1 | – | 89.0 | 67.8 | 8M || `mni_Latn` | 52.8 | – | 18.9 | 61.8 | 2M || `meu_Latn` | – | – | – | – | 2M || `ton_Latn` | 74.7 | 96.1 | 44.0 | 53.6 | 10M || `mps_Latn` | – | – | – | – | 2M || `war_Latn` | 73.6 | – | 32.3 | 59.7 | 16M || `bis_Latn` | 78.2 | – | 41.9 | 66.4 | 4M || `ory_Latn` | 65.7 | – | 31.1 | 41.4 | 6M || `pon_Latn` | 60.2 | – | – | – | <1M || `bjn_Latn` | 76.5 | – | 34.3 | 72.1 | 32M || `bru_Latn` | – | – | – | – | <1M || `hmr_Latn` | 68.0 | – | 71.8 | 85.9 | 2M || `szy_Latn` | – | – | – | – | <1M || `kaa_Latn` | 53.6 | 99.7 | 49.0 | 63.2 | 3M || `npi_Latn` | 66.7 | – | 51.5 | 38.0 | 3M || `kos_Latn` | – | – | – | – | <1M || `bgp_Latn` | 72.7 | – | 34.7 | 37.4 | 3M || `ape_Latn` | – | – | – | – | <1M || `mar_Latn` | 58.1 | – | 26.3 | 51.1 | 3M || `dtp_Latn` | 59.9 | – | 73.7 | 82.6 | 2M || `jpn_Latn` | 80.8 | – | 47.1 | 81.1 | 5M || `kan_Latn` | 53.8 | – | 8.3 | 40.7 | 3M || `hmo_Latn` | – | – | – | – | 1M || `ace_Latn` | 69.7 | – | 27.2 | 63.8 | 7M || `tuc_Latn` | – | – | – | – | <1M || `btx_Latn` | 59.6 | – | 25.0 | 66.3 | 1M || `krj_Latn` | – | – | – | – | <1M || `gil_Latn` | 66.9 | – | 48.4 | 66.4 | 2M || `hak_Latn` | 56.2 | – | – | – | <1M || `mjw_Latn` | – | – | – | – | <1M || `tpi_Latn` | 74.2 | – | 40.0 | 87.0 | 8M || `ppk_Latn` | – | – | – | – | <1M || `pau_Latn` | 50.6 | – | – | – | <1M || `ami_Latn` | – | – | – | – | <1M || `hnj_Latn` | 70.3 | – | – | – | <1M || `mah_Latn` | 59.2 | – | 20.8 | 68.8 | 2M || `trv_Latn` | – | – | – | – | <1M || `cmn_Latn` | 54.0 | – | 8.1 | 58.3 | 3M || `pag_Latn` | 84.1 | – | 21.1 | 46.7 | 2M || `raw_Latn` | 58.5 | – | – | – | <1M || `jra_Latn` | – | – | – | – | 2M || `asm_Latn` | 49.7 | – | 22.9 | 49.6 | 1M || `njo_Latn` | – | – | – | – | <1M || `rar_Latn` | 73.4 | – | 52.2 | 68.1 | 1M || `meo_Latn` | 61.9 | – | 42.4 | 18.9 | 1M || `chk_Latn` | – | – | – | – | 1M || `cha_Latn` | – | – | – | – | <1M || `guj_Latn` | 62.5 | – | 35.7 | 39.0 | 2M || `mak_Latn` | 58.7 | – | 38.6 | 57.1 | 1M || `cbk_Latn` | 60.1 | – | – | – | <1M || `min_Latn` | 76.0 | – | 41.3 | 64.4 | 36M || `tah_Latn` | 67.8 | – | 27.3 | 33.2 | 6M || `zom_Latn` | 64.9 | – | – | – | <1M || `hui_Latn` | – | – | – | – | 2M || `rug_Latn` | – | – | – | – | 2M || `tsg_Latn` | 84.9 | – | 46.4 | 40.0 | 1M || `bts_Latn` | – | – | – | – | 1M || `nia_Latn` | – | – | – | – | <1M || `mad_Latn` | – | – | – | – | <1M || `zha_Latn` | 59.4 | – | – | – | <1M || `mui_Latn` | 64.0 | – | 40.0 | 27.6 | 2M || `yap_Latn` | 83.5 | – | – | – | <1M || `zyb_Latn` | – | – | – | – | <1M || `kpg_Latn` | – | – | – | – | 1M || `vap_Latn` | – | – | – | – | <1M || `tay_Latn` | – | – | – | – | <1M || `eng_Latn` | 82.9 | – | 42.7 | 80.8 | 1,160M |
Mark restoration only runs for languages written with diacritics or tone marks. A `–` means no probe, or a languagewith under 1M characters of text, whose test set is too small to give a stable score. The group means above includeevery probed language.
## Use
```pythonimport json, sys, unicodedata, torchsys.path.insert(0, ".") # this repo, which ships the `dew` packageimport dew # registers the Dew architecture with transformersfrom transformers import AutoModelForMaskedLM
model = AutoModelForMaskedLM.from_pretrained(".").eval()v = json.load(open("vocab.json")) # {"vocab": [...], "labels": [...]}ids = {t: i for i, t in enumerate(v["vocab"])}
def encode(text, lang): text = unicodedata.normalize("NFC", text) return torch.tensor([[ids[f"<|lang:{lang}|>"]] + [ids.get(c, 1) for c in text]]) # 1 = <unk>
hidden = model.model(encode("Your text here", "vie_Latn"))[0] # [1, 1 + chars, 320], one vector per character```
To fine-tune, put a small head on `hidden` (one label per character or word) and train the whole model with a lowlearning rate (3e-4 worked for our tasks).
## Limits
- This is a base model, not a finished tool: fine-tune it for a task.- Speed on phone CPUs has not been measured yet. The DeltaNet layers use GPU kernels in training; an on-device build needs their recurrent form.- Masked-character accuracy measures how well the model knows the languages, not any one task. Compare it within a group, not across scripts.
## Licence
Apache-2.0.12345678910111213141516171819202122232425262728293031323334353637383940{ "architectures": [ "DewForMaskedLM" ], "aux_balance_coef": 0.01, "aux_passes_coef": 0.5, "aux_shared_coef": 0.5, "body": "GGAGGA", "causal": false, "coda": "", "conv_kernel": 4, "doorman": false, "expert_intermediate_size": 160, "ffn": "dense", "head_dim": 64, "hidden_size": 320, "initializer_range": 0.02, "intermediate_size": 1568, "linear_head_dim": 64, "linear_num_heads": 5, "max_loops": 1, "max_position_embeddings": 2048, "model_type": "dew", "num_attention_heads": 5, "num_experts": 8, "num_key_value_heads": 5, "pass_cap_prob": 0.25, "prelude": "", "qk_norm": true, "rms_norm_eps": 1e-06, "rope_theta": 10000.0, "router_threshold": 0.2, "shared_intermediate_size": 320, "shared_target": 0.15, "target_passes": 1.33, "torch_dtype": "float32", "transformers_version": "4.46.3", "vocab_size": 3114, "warm_start": 0.2}1234567891011121314151617181920212223"""Dew: an LLM architecture family (Gated DeltaNet + attention hybrid, Nap thinker MoE,doorman napping and looping). model_type "dew".
from dew import DewConfig, DewForCausalLM, dew_config, fit_params model = DewForCausalLM(dew_config("dew-1-loop", vocab_size=32000, hidden_size=512))
Importing this package registers Dew with transformers' Auto classes."""from .configuration_dew import DewConfigfrom .modeling_dew import STAT_NAMES, DewForCausalLM, DewForMaskedLM, DewModelfrom .presets import PRESETS, count_params, dew_config, fit_params
__version__ = "1.0.0"__all__ = ["DewConfig", "DewModel", "DewForCausalLM", "DewForMaskedLM", "PRESETS", "dew_config", "fit_params", "count_params", "STAT_NAMES"]
try: from transformers import AutoConfig, AutoModel, AutoModelForCausalLM, AutoModelForMaskedLM AutoConfig.register("dew", DewConfig, exist_ok=True) AutoModel.register(DewConfig, DewModel, exist_ok=True) AutoModelForCausalLM.register(DewConfig, DewForCausalLM, exist_ok=True) AutoModelForMaskedLM.register(DewConfig, DewForMaskedLM, exist_ok=True)except Exception: # transformers missing or too old: the model still works in plain PyTorch pass123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144"""DewConfig: one config describes every Dew model, from a 15M phone model to a large LLM.
The stack is embedding -> prelude -> body x (up to max_loops passes) -> coda -> norm -> head.Each of prelude / body / coda is a string of layer types:
G Gated DeltaNet layer (fixed-size memory, linear in text length) A attention layer (Qwen3-style: grouped-query, q/k norm, RoPE)
Examples transformer prelude="", body="AAAAAAAA", coda="", max_loops=1, ffn="dense" hybrid (2:1) prelude="", body="GGAGGA", coda="", max_loops=1, ffn="dense" Nap hybrid same as hybrid with ffn="nap" Nap & Loop prelude="G", body="GGA", coda="A", max_loops=3, doorman=True, ffn="nap"
Every layer has a mixer (G or A) and a thinker (ffn): "dense" is a SwiGLU block, "nap" is theNap thinker (router over num_experts small experts + a nap room that does nothing, and ashared expert with a per-word on/off switch).
causal=False makes an encoder (masked-LM base): attention sees both sides, and every DeltaNetlayer reads the text forwards and backwards (two memories, outputs added). Encoders run one pass,no doorman; padding is masked by `attention_mask` and writes nothing to either memory.
The doorman (doorman=True) decides per word, before every body pass, whether the word goesthrough the body again. Stopping is final. A word that does not take a pass neither writesDeltaNet memory nor enters that pass's attention memory. With max_loops=1 the doorman islayer napping; with max_loops>1 it is "Nap & Loop"."""from __future__ import annotations
try: from transformers import PretrainedConfigexcept ImportError: # lets the model run without transformers installed class PretrainedConfig: # type: ignore[no-redef] model_type = ""
def __init__(self, **kw): for k, v in kw.items(): setattr(self, k, v)
def to_dict(self): return {k: v for k, v in self.__dict__.items() if not k.startswith("_")}
class DewConfig(PretrainedConfig): model_type = "dew" keys_to_ignore_at_inference = ["past_key_values"]
def __init__( self, vocab_size: int = 16384, hidden_size: int = 320, causal: bool = True, # layout prelude: str = "G", body: str = "GGA", coda: str = "A", max_loops: int = 3, doorman: bool = True, target_passes: float = 1.33, pass_cap_prob: float = 0.25, warm_start: float = 0.2, # attention (A) num_attention_heads: int = 5, num_key_value_heads: int | None = None, head_dim: int | None = None, qk_norm: bool = True, rope_theta: float = 10000.0, max_position_embeddings: int = 2048, # Gated DeltaNet (G) linear_num_heads: int | None = None, linear_head_dim: int | None = None, conv_kernel: int = 4, # thinker ffn: str = "nap", intermediate_size: int = 864, num_experts: int = 8, expert_intermediate_size: int = 160, shared_intermediate_size: int = 320, router_threshold: float = 0.2, shared_target: float = 0.15, # auxiliary losses aux_balance_coef: float = 0.01, aux_passes_coef: float = 0.5, aux_shared_coef: float = 0.5, # misc rms_norm_eps: float = 1e-6, initializer_range: float = 0.02, tie_word_embeddings: bool = True, **kwargs, ): for s, name in ((prelude, "prelude"), (body, "body"), (coda, "coda")): if set(s) - {"G", "A"}: raise ValueError(f"{name} may only contain G and A, got {s!r}") if not body and max_loops > 1: raise ValueError("max_loops > 1 needs a body") if not causal and (max_loops > 1 or doorman): raise ValueError("encoders (causal=False) run one pass without a doorman") if ffn not in ("dense", "nap"): raise ValueError("ffn must be 'dense' or 'nap'") self.vocab_size = vocab_size self.hidden_size = hidden_size self.causal = bool(causal) self.prelude, self.body, self.coda = prelude, body, coda self.max_loops = max(1, int(max_loops)) self.doorman = bool(doorman) self.target_passes = target_passes self.pass_cap_prob = pass_cap_prob self.warm_start = warm_start self.num_attention_heads = num_attention_heads self.num_key_value_heads = num_key_value_heads or num_attention_heads self.head_dim = head_dim or hidden_size // num_attention_heads self.qk_norm = qk_norm self.rope_theta = rope_theta self.max_position_embeddings = max_position_embeddings self.linear_num_heads = linear_num_heads or num_attention_heads self.linear_head_dim = linear_head_dim or hidden_size // self.linear_num_heads self.conv_kernel = conv_kernel self.ffn = ffn self.intermediate_size = intermediate_size self.num_experts = num_experts self.expert_intermediate_size = expert_intermediate_size self.shared_intermediate_size = shared_intermediate_size self.router_threshold = router_threshold self.shared_target = shared_target self.aux_balance_coef = aux_balance_coef self.aux_passes_coef = aux_passes_coef self.aux_shared_coef = aux_shared_coef self.rms_norm_eps = rms_norm_eps self.initializer_range = initializer_range super().__init__(tie_word_embeddings=tie_word_embeddings, **kwargs)
@property def layer_passes(self) -> float: """Layer-passes per word at the target loop count (compute, not parameters).""" passes = self.target_passes if (self.doorman and self.max_loops > 1) else self.max_loops return len(self.prelude) + passes * len(self.body) + len(self.coda)
def describe(self) -> str: loop = f" x{self.max_loops} passes" + (" (doorman)" if self.doorman else "") if self.max_loops > 1 else \ (" (doorman napping)" if self.doorman else "") kind = "Dew-enc" if not self.causal else "Dew" think = (f" {self.num_experts}x{self.expert_intermediate_size}+nap+shared{self.shared_intermediate_size}" if self.ffn == "nap" else f" {self.intermediate_size}") return f"{kind} [{self.prelude or '-'} | {self.body}{loop} | {self.coda or '-'}] d={self.hidden_size} ffn={self.ffn}{think}"123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687"""ONNX export of Dew as a one-word step model.
Inputs : input_ids [B] int64, position [1] int64, then every state tensor from init_state()Outputs: logits [B, vocab], then the new state tensors (same order, names prefixed "new_")
DeltaNet memories and convolution buffers have a fixed size; attention keys/values/keep grow byone word per step (dynamic axis "p<i>"). Start from zero-length attention state (seeinitial_state_numpy) and feed each step's outputs back in."""from __future__ import annotations
from pathlib import Path
import numpy as npimport torchimport torch.nn as nn
class _Step(nn.Module): def __init__(self, lm): super().__init__() self.lm = lm
def forward(self, input_ids, position, *state): logits, new = self.lm.step(input_ids, position, list(state)) return (logits, *new)
def initial_state_numpy(lm, batch: int = 1): return [t.cpu().numpy() for t in lm.init_state(batch, device=torch.device("cpu"))]
def export_onnx(lm, out_dir, name: str = "dew", int8: bool = True, opset: int = 17) -> dict: lm = lm.float().eval().cpu() out_dir = Path(out_dir) out_dir.mkdir(parents=True, exist_ok=True) kinds = lm.model.state_kinds() # trace with two words already in the attention memory, so its length is a real dynamic axis state = lm.init_state(1, device=torch.device("cpu")) with torch.no_grad(): for t, tok in enumerate((1, 2)): _, state = lm.step(torch.tensor([tok]), torch.tensor([t]), state) ids, pos = torch.tensor([3]), torch.tensor([2]) in_names = ["input_ids", "position"] + kinds out_names = ["logits"] + [f"new_{k}" for k in kinds] dyn = {"input_ids": {0: "batch"}, "logits": {0: "batch"}} for i, k in enumerate(kinds): ax = {0: "batch"} if k.endswith(("_keys", "_values")): ax[2] = f"p{i}" elif k.endswith("_keep"): ax[1] = f"p{i}" dyn[k] = ax dyn[f"new_{k}"] = {a: (v + "n" if v.startswith("p") else v) for a, v in ax.items()} f = out_dir / f"{name}.onnx" with torch.no_grad(): torch.onnx.export(_Step(lm), (ids, pos, *state), str(f), input_names=in_names, output_names=out_names, dynamic_axes=dyn, opset_version=opset, dynamo=False) res = {"onnx": str(f), "onnx_mb": f.stat().st_size / 1e6} if int8: from onnxruntime.quantization import QuantType, quantize_dynamic q = out_dir / f"{name}.int8.onnx" quantize_dynamic(str(f), str(q), weight_type=QuantType.QInt8) res.update(int8=str(q), int8_mb=q.stat().st_size / 1e6) return res
def verify_onnx(lm, onnx_path, n_words: int = 24, seed: int = 0) -> float: """Feed the same words to ONNX (step by step) and to the PyTorch full-sequence forward. Returns the largest absolute logit difference.""" import onnxruntime as ort lm = lm.float().eval().cpu() g = torch.Generator().manual_seed(seed) ids = torch.randint(0, lm.config.vocab_size, (1, n_words), generator=g) with torch.no_grad(): ref = lm(ids).logits[0].numpy() sess = ort.InferenceSession(str(onnx_path), providers=["CPUExecutionProvider"]) names = [i.name for i in sess.get_inputs()] state = initial_state_numpy(lm) worst = 0.0 for t in range(n_words): feeds = {"input_ids": ids[:, t].numpy(), "position": np.array([t], dtype=np.int64)} feeds.update({n: s for n, s in zip(names[2:], state)}) out = sess.run(None, feeds) worst = max(worst, float(np.abs(out[0][0] - ref[t]).max())) state = out[1:] return worst123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555"""Dew: hybrid Gated DeltaNet + attention LM with the Nap thinker and doorman looping.
Two ways to run a model: * forward(input_ids) whole sequence at once (training, scoring) * step(ids, position, state) one word at a time with a fixed-size DeltaNet state and an attention cache (decoding, ONNX export). Gives the same logits."""from __future__ import annotations
import mathfrom dataclasses import dataclassfrom typing import Optional
import torchimport torch.nn as nnimport torch.nn.functional as F
from .configuration_dew import DewConfigfrom .ops import delta_step, gated_delta_rule, l2norm
try: from transformers import PreTrainedModel from transformers.utils import ModelOutput try: from transformers import GenerationMixin except ImportError: GenerationMixin = object # type: ignore[misc,assignment] _HF = Trueexcept ImportError: # plain PyTorch fallback _HF = False PreTrainedModel = nn.Module # type: ignore[misc,assignment] ModelOutput = object # type: ignore[misc,assignment] GenerationMixin = object # type: ignore[misc,assignment]
@dataclassclass DewCausalLMOutput(ModelOutput): loss: Optional[torch.Tensor] = None logits: Optional[torch.Tensor] = None aux_loss: Optional[torch.Tensor] = None router_stats: Optional[torch.Tensor] = None # [passes/word, nap share, experts/word, shared on, nap-room share]
STAT_NAMES = ("passes", "nap", "experts", "shared", "naproom")
# --- small pieces --------------------------------------------------------------------------
class DewRMSNorm(nn.Module): def __init__(self, d: int, eps: float = 1e-6): super().__init__() self.weight = nn.Parameter(torch.ones(d)) self.eps = eps
def forward(self, x): dt = x.dtype x = x.float() return (x * torch.rsqrt(x.pow(2).mean(-1, keepdim=True) + self.eps) * self.weight.float()).to(dt)
def rope_tables(pos: torch.Tensor, dim: int, theta: float): """pos: [T] -> cos, sin: [T, dim] (HF rotate-half layout).""" inv = 1.0 / (theta ** (torch.arange(0, dim, 2, device=pos.device, dtype=torch.float32) / dim)) f = pos.float()[:, None] * inv[None] emb = torch.cat([f, f], -1) return emb.cos(), emb.sin()
def _rot(x): a, b = x.chunk(2, -1) return torch.cat([-b, a], -1)
def apply_rope(x, cos, sin): return (x.float() * cos + _rot(x.float()) * sin).to(x.dtype)
# --- mixers --------------------------------------------------------------------------------
class DewAttention(nn.Module): """Qwen3-style attention: grouped-query heads, RMSNorm on q and k, RoPE. `keep` ([B, T], 1 = word stored in this layer's memory) hides napping words from later words."""
n_state = 3
def __init__(self, c: DewConfig): super().__init__() self.h, self.kvh, self.hd = c.num_attention_heads, c.num_key_value_heads, c.head_dim self.causal = c.causal d = c.hidden_size self.q_proj = nn.Linear(d, self.h * self.hd, bias=False) self.k_proj = nn.Linear(d, self.kvh * self.hd, bias=False) self.v_proj = nn.Linear(d, self.kvh * self.hd, bias=False) self.o_proj = nn.Linear(self.h * self.hd, d, bias=False) self.q_norm = DewRMSNorm(self.hd, c.rms_norm_eps) if c.qk_norm else None self.k_norm = DewRMSNorm(self.hd, c.rms_norm_eps) if c.qk_norm else None
def _qkv(self, x): shp = x.shape[:-1] q = self.q_proj(x).view(*shp, self.h, self.hd) k = self.k_proj(x).view(*shp, self.kvh, self.hd) v = self.v_proj(x).view(*shp, self.kvh, self.hd) if self.q_norm is not None: q, k = self.q_norm(q), self.k_norm(k) return q, k, v
def _rep(self, t): return t if self.h == self.kvh else t.repeat_interleave(self.h // self.kvh, 1)
def forward(self, x, keep, cos, sin): B, T, _ = x.shape q, k, v = (t.transpose(1, 2) for t in self._qkv(x)) # [B, heads, T, hd] q, k = apply_rope(q, cos, sin), apply_rope(k, cos, sin) k, v = self._rep(k), self._rep(v) if keep is None: y = F.scaled_dot_product_attention(q, k, v, is_causal=self.causal) else: eye = torch.eye(T, dtype=torch.bool, device=x.device) mask = (keep > 0.5)[:, None, :] | eye # a word always sees itself if self.causal: mask = mask & torch.ones(T, T, dtype=torch.bool, device=x.device).tril() y = F.scaled_dot_product_attention(q, k, v, attn_mask=mask[:, None]) return self.o_proj(y.transpose(1, 2).reshape(B, T, self.h * self.hd))
def init_state(self, B, device, dtype): z = torch.zeros(B, self.kvh, 0, self.hd, device=device, dtype=dtype) return [z, z.clone(), torch.zeros(B, 0, device=device, dtype=dtype)]
def step(self, x, m, cos, sin, K, V, keep): q, k, v = (t[:, :, None] for t in self._qkv(x)) # [B, heads, 1, hd] q, k = apply_rope(q, cos, sin), apply_rope(k, cos, sin) K = torch.cat([K, k.to(K.dtype)], 2) V = torch.cat([V, v.to(V.dtype)], 2) keep = torch.cat([keep, m[:, None].to(keep.dtype)], 1) allow = torch.cat([keep[:, :-1], torch.ones_like(keep[:, :1])], 1) att = (q.float() @ self._rep(K).float().transpose(-1, -2)) * self.hd ** -0.5 # [B, h, 1, P] att = att + (allow[:, None, None, :].float() - 1.0) * 1e9 y = torch.softmax(att, -1) @ self._rep(V).float() return self.o_proj(y.reshape(x.shape[0], self.h * self.hd).to(x.dtype)), K, V, keep
class DewGatedDeltaNet(nn.Module): """Gated DeltaNet (Yang et al. 2024) with short causal convolutions and an output gate. `m` ([B, T], 0 = napping) zeroes the word's write strength and decay, and its input to the convolutions, so a napping word leaves the memory exactly as it was."""
n_state = 2
def __init__(self, c: DewConfig): super().__init__() self.H, self.dk = c.linear_num_heads, c.linear_head_dim inner = self.H * self.dk d = c.hidden_size self.inner, self.kconv = inner, c.conv_kernel self.q_proj = nn.Linear(d, inner, bias=False) self.k_proj = nn.Linear(d, inner, bias=False) self.v_proj = nn.Linear(d, inner, bias=False) self.g_proj = nn.Linear(d, inner, bias=False) self.a_proj = nn.Linear(d, self.H, bias=False) self.b_proj = nn.Linear(d, self.H, bias=False) self.conv = nn.Conv1d(3 * inner, 3 * inner, c.conv_kernel, groups=3 * inner, bias=False) self.A_log = nn.Parameter(torch.zeros(self.H)) self.dt_bias = nn.Parameter(torch.zeros(self.H)) self.o_norm = DewRMSNorm(self.dk, c.rms_norm_eps) self.o_proj = nn.Linear(inner, d, bias=False) self.reset_gates()
@torch.no_grad() def reset_gates(self): if self.A_log.is_meta: return self.A_log.copy_(torch.empty(self.H).uniform_(1, 16).log()) dt = torch.exp(torch.rand(self.H) * (math.log(0.1) - math.log(0.001)) + math.log(0.001)).clamp(min=1e-4) self.dt_bias.copy_(dt + torch.log(-torch.expm1(-dt))) # inverse softplus
def _gates(self, x, m): beta = torch.sigmoid(self.b_proj(x).float()) g = -self.A_log.float().exp() * F.softplus(self.a_proj(x).float() + self.dt_bias.float()) if m is not None: beta, g = beta * m[..., None], g * m[..., None] return g, beta
def _split(self, qkv, shp): q, k, v = qkv.split(self.inner, -1) q, k, v = (t.reshape(*shp, self.H, self.dk) for t in (q, k, v)) return l2norm(q.float()).to(v.dtype), l2norm(k.float()).to(v.dtype), v
def forward(self, x, m, cos=None, sin=None): B, T, _ = x.shape xin = x if m is None else x * m[..., None].to(x.dtype) qkv = torch.cat([self.q_proj(xin), self.k_proj(xin), self.v_proj(xin)], -1) qkv = F.silu(self.conv(F.pad(qkv.transpose(1, 2), (self.kconv - 1, 0))).transpose(1, 2)) q, k, v = self._split(qkv, (B, T)) g, beta = self._gates(x, m) o = gated_delta_rule(q.contiguous(), k.contiguous(), v.contiguous(), g.contiguous(), beta.contiguous()) o = self.o_norm(o) * F.silu(self.g_proj(x)).view(B, T, self.H, self.dk).to(o.dtype) return self.o_proj(o.reshape(B, T, self.inner))
def init_state(self, B, device, dtype): return [torch.zeros(B, self.H, self.dk, self.dk, device=device, dtype=torch.float32), torch.zeros(B, 3 * self.inner, self.kconv - 1, device=device, dtype=dtype)]
def step(self, x, m, cos, sin, S, cbuf): B = x.shape[0] xin = x * m[:, None].to(x.dtype) new = torch.cat([self.q_proj(xin), self.k_proj(xin), self.v_proj(xin)], -1) win = torch.cat([cbuf, new[..., None].to(cbuf.dtype)], -1) # oldest .. newest qkv = F.silu((win * self.conv.weight[:, 0, :].to(win.dtype)).sum(-1)) q, k, v = self._split(qkv, (B,)) g, beta = self._gates(x, None) g, beta = g * m[:, None], beta * m[:, None] o, S = delta_step(q.float(), k.float(), v.float(), g, beta, S) o = self.o_norm(o.to(x.dtype)) * F.silu(self.g_proj(x)).view(B, self.H, self.dk) return self.o_proj(o.reshape(B, self.inner)), S, win[..., 1:]
class DewBiGatedDeltaNet(nn.Module): """Encoder DeltaNet: one Gated DeltaNet reads left to right, a second reads right to left; outputs add. Padding (m = 0) writes nothing to either memory, so a padded batch gives the same outputs."""
n_state = 0
def __init__(self, c: DewConfig): super().__init__() self.fwd, self.bwd = DewGatedDeltaNet(c), DewGatedDeltaNet(c)
def forward(self, x, m, cos=None, sin=None): mb = None if m is None else m.flip(1) return self.fwd(x, m) + self.bwd(x.flip(1), mb).flip(1)
# --- thinkers ------------------------------------------------------------------------------
class DewMLP(nn.Module): def __init__(self, d: int, f: int): super().__init__() self.gate_up = nn.Linear(d, 2 * f, bias=False) self.down = nn.Linear(f, d, bias=False)
def forward(self, x, need_aux: bool = True): g, u = self.gate_up(x).chunk(2, -1) return self.down(F.silu(g) * u), None, None
class DewNapThinker(nn.Module): """Router over E small experts plus a nap room (no expert, no cost). Every expert whose router share is >= router_threshold runs (the top slot always counts, so a word can nap); a shared expert is switched on or off per word. All experts run as one grouped matmul."""
def __init__(self, c: DewConfig): super().__init__() d, E, fe, fs = c.hidden_size, c.num_experts, c.expert_intermediate_size, c.shared_intermediate_size self.E, self.fe, self.c = E, fe, c self.router = nn.Linear(d, E + 1, bias=False) self.experts_in = nn.Linear(d, E * 2 * fe, bias=False) # per expert: [gate | up] self.experts_out = nn.Linear(E * fe, d, bias=False) self.shared = DewMLP(d, fs) self.switch = nn.Linear(d, 1, bias=True)
def forward(self, x, need_aux: bool = True): shp = x.shape x2 = x.reshape(-1, shp[-1]) N, E, fe = x2.shape[0], self.E, self.fe p = torch.softmax(self.router(x2).float(), -1) # [N, E + 1], last = nap room sel = (p >= self.c.router_threshold) | (p >= p.amax(-1, keepdim=True)) w = (p * sel)[:, :E] h = self.experts_in(x2).view(N, E, 2 * fe) a = F.silu(h[..., :fe]) * h[..., fe:] * w[..., None].to(h.dtype) y = self.experts_out(a.reshape(N, E * fe)) sw = torch.sigmoid(self.switch(x2).float()).squeeze(-1) on = (sw > 0.5).float() gate = on + sw - sw.detach() # hard switch, soft gradient y = y + gate[:, None].to(y.dtype) * self.shared(x2)[0] if not need_aux: return y.view(shp), None, None f, P = sel.float().mean(0), p.mean(0) aux = self.c.aux_balance_coef * (E + 1) * (f * P).sum() + self.c.aux_shared_coef * (sw.mean() - self.c.shared_target) ** 2 stats = torch.stack([sel[:, :E].float().sum(1).mean(), on.mean(), (~sel[:, :E].any(1)).float().mean()]).detach() return y.view(shp), aux, stats
# --- layer and model -----------------------------------------------------------------------
class DewLayer(nn.Module): def __init__(self, c: DewConfig, kind: str): super().__init__() self.kind = kind self.input_layernorm = DewRMSNorm(c.hidden_size, c.rms_norm_eps) self.mixer = (DewGatedDeltaNet(c) if c.causal else DewBiGatedDeltaNet(c)) if kind == "G" else DewAttention(c) self.post_attention_layernorm = DewRMSNorm(c.hidden_size, c.rms_norm_eps) self.mlp = DewNapThinker(c) if c.ffn == "nap" else DewMLP(c.hidden_size, c.intermediate_size) self.n_state = self.mixer.n_state
def forward(self, x, m, cos, sin): x = x + self.mixer(self.input_layernorm(x), m, cos, sin) y, aux, st = self.mlp(self.post_attention_layernorm(x)) return x + y, aux, st
def step(self, x, m, cos, sin, state): h, *state = self.mixer.step(self.input_layernorm(x), m, cos, sin, *state) x = x + h return x + self.mlp(self.post_attention_layernorm(x), need_aux=False)[0], state
class DewPreTrainedModel(PreTrainedModel): if _HF: config_class = DewConfig base_model_prefix = "model" _no_split_modules = ["DewLayer"] supports_gradient_checkpointing = False
def _init_weights(self, module): std = self.config.initializer_range if isinstance(module, (nn.Linear, nn.Embedding)): module.weight.data.normal_(0.0, std) if getattr(module, "bias", None) is not None: module.bias.data.zero_() if getattr(module, "_dew_door", False): module.bias.data.fill_(1.0) # doormen start mostly awake elif isinstance(module, DewGatedDeltaNet): module.reset_gates() elif isinstance(module, DewRMSNorm): module.weight.data.fill_(1.0)
if not _HF: def __init__(self, config): super().__init__() self.config = config
def post_init(self): self.apply(self._init_weights)
class DewModel(DewPreTrainedModel): def __init__(self, config: DewConfig): super().__init__(config) c = self.c = config self.embed_tokens = nn.Embedding(c.vocab_size, c.hidden_size) self.prelude = nn.ModuleList(DewLayer(c, t) for t in c.prelude) self.body = nn.ModuleList(DewLayer(c, t) for t in c.body) self.coda = nn.ModuleList(DewLayer(c, t) for t in c.coda) self.doors = None if c.doorman: self.doors = nn.ModuleList(nn.Linear(c.hidden_size, 1) for _ in range(c.max_loops)) for dl in self.doors: dl._dew_door = True self.pass_embed = nn.Parameter(torch.zeros(c.max_loops, c.hidden_size)) if c.max_loops > 1 else None self.norm = DewRMSNorm(c.hidden_size, c.rms_norm_eps) self.post_init()
def get_input_embeddings(self): return self.embed_tokens
def set_input_embeddings(self, v): self.embed_tokens = v
def _rope(self, pos): return rope_tables(pos, self.c.head_dim, self.c.rope_theta)
def forward(self, input_ids, pass_cap: int = 0, warm: bool = False, attention_mask=None): c = self.c x = self.embed_tokens(input_ids) B, T = input_ids.shape cos, sin = self._rope(torch.arange(T, device=input_ids.device)) aux = torch.zeros((), device=x.device) st = [] if not c.causal: # encoder: one pass, padding masked everywhere m = None if attention_mask is None else attention_mask.to(torch.float32) for L in list(self.prelude) + list(self.body) + list(self.coda): x, a, s = L(x, m, cos, sin) if a is not None: aux = aux + a st.append(s) think = torch.stack(st).mean(0) if st else torch.zeros(3, device=x.device) stats = torch.cat([torch.ones(1, device=x.device), torch.zeros(1, device=x.device), think]).detach() return self.norm(x), aux, stats
def run(L, x, m): nonlocal aux x, a, s = L(x, m, cos, sin) if a is not None: aux = aux + a st.append(s) return x
for L in self.prelude: x = run(L, x, None) n_loops = min(pass_cap, c.max_loops) if pass_cap else c.max_loops active = prod = expected = None passes = torch.full((B, T), float(n_loops), device=x.device) if self.doors is not None: passes = torch.zeros((B, T), device=x.device) for k in range(n_loops): m = gate = None if self.doors is not None: r = torch.sigmoid(self.doors[k](x).float()).squeeze(-1) hard = torch.ones_like(r) if warm else (r > 0.5).float() prev = torch.ones_like(r) if active is None else active m = prev * hard gate = prev * (hard + r - r.detach()) prod = r if prod is None else prod * r expected = prod if expected is None else expected + prod active = m passes = passes + m u = x if self.pass_embed is None else x + self.pass_embed[k].to(x.dtype) h = u for L in self.body: h = run(L, h, m) x = h if gate is None else x + gate[..., None].to(h.dtype) * (h - u) for L in self.coda: x = run(L, x, None) if self.doors is not None and self.training and not pass_cap and expected is not None: aux = aux + c.aux_passes_coef * (expected.mean() - c.target_passes) ** 2 think = torch.stack(st).mean(0) if st else torch.zeros(3, device=x.device) stats = torch.cat([torch.stack([passes.mean(), (passes == 0).float().mean()]), think]).detach() return self.norm(x), aux, stats
# --- one word at a time ---------------------------------------------------------------
def _instances(self): """Layer instances in state order: prelude, body once per pass, coda.""" return list(self.prelude) + [L for _ in range(self.c.max_loops) for L in self.body] + list(self.coda)
def init_state(self, batch: int = 1, device=None, dtype=torch.float32): device = device or self.embed_tokens.weight.device out = [] for L in self._instances(): out += L.mixer.init_state(batch, device, dtype) return out
def state_kinds(self): out = [] for i, L in enumerate(self._instances()): out += [f"l{i}_deltanet_memory", f"l{i}_conv"] if L.kind == "G" else [f"l{i}_keys", f"l{i}_values", f"l{i}_keep"] return out
def step(self, input_ids, position, state): """input_ids: [B], position: [1] (int), state: list from init_state. Returns hidden [B, d], new state.""" c = self.c if not c.causal: raise ValueError("step() is for causal models; an encoder reads the whole text at once") x = self.embed_tokens(input_ids) B = x.shape[0] cos, sin = self._rope(position.reshape(1)) ones = torch.ones(B, device=x.device, dtype=torch.float32) new, i = [], 0
def run(L, x, m): nonlocal i x, s = L.step(x, m, cos, sin, state[i:i + L.n_state]) new.extend(s) i += L.n_state return x
for L in self.prelude: x = run(L, x, ones) active = ones for k in range(c.max_loops): m = ones if self.doors is not None: r = torch.sigmoid(self.doors[k](x).float()).squeeze(-1) m = active * (r > 0.5).float() active = m u = x if self.pass_embed is None else x + self.pass_embed[k].to(x.dtype) h = u for L in self.body: h = run(L, h, m) x = h if self.doors is None else x + m[:, None].to(h.dtype) * (h - u) for L in self.coda: x = run(L, x, ones) return self.norm(x), new
class DewForCausalLM(DewPreTrainedModel, *(() if GenerationMixin is object else (GenerationMixin,))): _tied_weights_keys = ["lm_head.weight"]
def __init__(self, config: DewConfig): super().__init__(config) self.model = DewModel(config) self.lm_head = nn.Linear(config.hidden_size, config.vocab_size, bias=False) self.post_init() if not _HF and config.tie_word_embeddings: self.lm_head.weight = self.model.embed_tokens.weight
def get_input_embeddings(self): return self.model.embed_tokens
def set_input_embeddings(self, v): self.model.embed_tokens = v
def get_output_embeddings(self): return self.lm_head
def set_output_embeddings(self, v): self.lm_head = v
def forward(self, input_ids=None, labels=None, attention_mask=None, pass_cap: int = 0, warm: bool = False, return_dict: bool = True, **kwargs): """attention_mask is accepted for API compatibility; padding inside a batch is not supported (pad on the right and ignore those labels with -100).""" h, aux, stats = self.model(input_ids, pass_cap=pass_cap, warm=warm) logits = self.lm_head(h) loss = None if labels is not None: ce = F.cross_entropy(logits[:, :-1].float().reshape(-1, logits.shape[-1]), labels[:, 1:].reshape(-1), ignore_index=-100) loss = ce + aux out = DewCausalLMOutput(loss=loss, logits=logits, aux_loss=aux, router_stats=stats) return out if return_dict else (loss, logits)
def prepare_inputs_for_generation(self, input_ids, **kwargs): return {"input_ids": input_ids} # no HF cache: use step() for fast decoding
def init_state(self, batch: int = 1, device=None, dtype=torch.float32): return self.model.init_state(batch, device, dtype)
def step(self, input_ids, position, state): h, state = self.model.step(input_ids, position, state) return self.lm_head(h), state
class DewForMaskedLM(DewPreTrainedModel): """Encoder base (causal=False): predicts masked tokens from both sides. labels = -100 where not masked.""" _tied_weights_keys = ["lm_head.weight"]
def __init__(self, config: DewConfig): super().__init__(config) if config.causal: raise ValueError("DewForMaskedLM needs causal=False") self.model = DewModel(config) self.lm_head = nn.Linear(config.hidden_size, config.vocab_size, bias=False) self.post_init() if not _HF and config.tie_word_embeddings: self.lm_head.weight = self.model.embed_tokens.weight
def get_input_embeddings(self): return self.model.embed_tokens
def set_input_embeddings(self, v): self.model.embed_tokens = v
def get_output_embeddings(self): return self.lm_head
def set_output_embeddings(self, v): self.lm_head = v
def forward(self, input_ids=None, labels=None, attention_mask=None, return_dict: bool = True, **kwargs): h, aux, stats = self.model(input_ids, attention_mask=attention_mask) logits = self.lm_head(h) loss = None if labels is not None: loss = F.cross_entropy(logits.float().reshape(-1, logits.shape[-1]), labels.reshape(-1), ignore_index=-100) + aux out = DewCausalLMOutput(loss=loss, logits=logits, aux_loss=aux, router_stats=stats) return out if return_dict else (loss, logits)123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121"""Gated delta rule: the memory update inside Dew's DeltaNet layers.
Per head the memory is a matrix S (key dim x value dim). For each word t:
S <- exp(g_t) * S decay (g_t <= 0, log space) S <- S + beta_t * k_t (v_t - S^T k_t)^T delta write (beta_t in [0, 1]) o_t = S^T q_t * scale read
A word with beta = 0 and g = 0 leaves S exactly as it was: this is how a napping word"does not write to the whiteboard and causes no decay".
Three implementations, checked against each other by `python -m dew.selftest`: * fla Triton kernels from flash-linear-attention (fast training on GPU) * chunk pure PyTorch, chunked (WY / UT form), any device, used when fla is missing * step one word at a time, used for decoding and the ONNX export"""from __future__ import annotations
import inspectimport os
import torch
_FLA = None # None = not checked yet, False = unavailable
def _fla(): global _FLA if _FLA is None: _FLA = False if os.environ.get("DEW_NO_FLA") != "1": try: from fla.ops.gated_delta_rule import chunk_gated_delta_rule as f params = inspect.signature(f).parameters _FLA = (f, "head_first" in params) except Exception: _FLA = False return _FLA
def fla_available() -> bool: return bool(_fla())
def l2norm(x: torch.Tensor, eps: float = 1e-6) -> torch.Tensor: return x * torch.rsqrt(x.pow(2).sum(-1, keepdim=True) + eps)
def gated_delta_rule(q, k, v, g, beta, impl: str = "auto"): """q, k: [B, T, H, K] (already L2-normalised), v: [B, T, H, V], g, beta: [B, T, H]. Returns o: [B, T, H, V] in v's dtype.""" scale = q.shape[-1] ** -0.5 f = _fla() if impl in ("auto", "fla") else False if f and q.is_cuda: fn, has_head_first = f kw = {"scale": scale, "output_final_state": False} if has_head_first: kw["head_first"] = False o, _ = fn(q, k, v, g.float(), beta.to(q.dtype), **kw) return o.to(v.dtype) if impl == "fla": raise RuntimeError("fla requested but not available") return chunk_reference(q, k, v, g, beta, scale).to(v.dtype)
def chunk_reference(q, k, v, g, beta, scale, chunk: int = 64): """Chunked gated delta rule in plain PyTorch (fp32). Same maths as fla's reference.""" dt = v.dtype with torch.autocast(q.device.type, enabled=False): q, k, v, g, beta = (x.float().transpose(1, 2) for x in (q, k, v, g, beta)) # [B, H, T, .] B, H, T, K = k.shape V = v.shape[-1] pad = (chunk - T % chunk) % chunk if pad: q, k, v = (torch.nn.functional.pad(x, (0, 0, 0, pad)) for x in (q, k, v)) g, beta = (torch.nn.functional.pad(x, (0, pad)) for x in (g, beta)) n = q.shape[2] // chunk q = q * scale kb = k * beta[..., None] vb = v * beta[..., None] q, k, kb, vb = (x.view(B, H, n, chunk, -1) for x in (q, k, kb, vb)) g = g.view(B, H, n, chunk).cumsum(-1) tri = torch.ones(chunk, chunk, dtype=torch.bool, device=q.device).tril() diff = (g[..., :, None] - g[..., None, :]).masked_fill(~tri, float("-inf")) L = diff.exp() # decay from j to i (i >= j) A = ((kb @ k.transpose(-1, -2)) * L).tril(-1) eye = torch.eye(chunk, device=q.device).expand_as(A) Tm = torch.linalg.solve_triangular(eye + A, eye, upper=False, unitriangular=True) # (I + A)^-1 kcd = Tm @ (kb * g.exp()[..., None]) u = Tm @ vb S = q.new_zeros(B, H, K, V) o = torch.empty_like(u) for i in range(n): qi, ki, gi = q[:, :, i], k[:, :, i], g[:, :, i] att = (qi @ ki.transpose(-1, -2) * L[:, :, i]).tril() vnew = u[:, :, i] - kcd[:, :, i] @ S o[:, :, i] = (qi * gi.exp()[..., None]) @ S + att @ vnew S = S * gi[..., -1, None, None].exp() + (ki * (gi[..., -1, None] - gi).exp()[..., None]).transpose(-1, -2) @ vnew o = o.view(B, H, n * chunk, V)[:, :, :T] return o.transpose(1, 2).to(dt)
def delta_step(q, k, v, g, beta, S): """One word. q, k: [B, H, K] (L2-normalised), v: [B, H, V], g, beta: [B, H], S: [B, H, K, V].""" scale = q.shape[-1] ** -0.5 S = S * g.exp()[..., None, None] kv = (k[..., None] * S).sum(-2) # S^T k S = S + k[..., None] * ((v - kv) * beta[..., None])[..., None, :] o = (q[..., None] * S).sum(-2) * scale return o, S
def recurrent_reference(q, k, v, g, beta): """Whole sequence, one word at a time (slow; for tests).""" B, T, H, K = q.shape S = q.new_zeros(B, H, K, v.shape[-1]).float() out = [] for t in range(T): o, S = delta_step(q[:, t].float(), k[:, t].float(), v[:, t].float(), g[:, t].float(), beta[:, t].float(), S) out.append(o) return torch.stack(out, 1)1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162"""Named Dew-1 layouts and sizing to a parameter budget.
from dew import dew_config, fit_params cfg = fit_params(dew_config("dew-1-loop", vocab_size=16384, hidden_size=320), 15_160_640)"""from __future__ import annotations
import torch
from .configuration_dew import DewConfig
PRESETS = { # Nap & Loop: 1 awake layer, a shared G-G-A block run 0-3 times per word, 1 awake attention layer "dew-1-loop": dict(prelude="G", body="GGA", coda="A", max_loops=3, doorman=True, ffn="nap"), # Nap hybrid: DeltaNet:attention 2:1, Nap thinker in every layer, no doorman "dew-1-nap": dict(prelude="", body="GGAGGA", coda="", max_loops=1, doorman=False, ffn="nap"), # Selective-memory hybrid: as dew-1-nap with a doorman that lets words skip the middle layers "dew-1-napskip": dict(prelude="G", body="GGAG", coda="A", max_loops=1, doorman=True, ffn="nap", target_passes=0.5), # Encoders (masked-LM bases): DeltaNet both ways + attention without the causal mask "dew-1-enc": dict(prelude="", body="GGAGGA", coda="", max_loops=1, doorman=False, ffn="nap", causal=False), "dew-1-enc-hybrid": dict(prelude="", body="GGAGGA", coda="", max_loops=1, doorman=False, ffn="dense", causal=False), "dew-1-enc-dense": dict(prelude="", body="AAAAAAAA", coda="", max_loops=1, doorman=False, ffn="dense", causal=False), # Controls "dew-1-hybrid": dict(prelude="", body="GGAGGA", coda="", max_loops=1, doorman=False, ffn="dense"), "dew-1-dense": dict(prelude="", body="AAAAAAAA", coda="", max_loops=1, doorman=False, ffn="dense"),}
def dew_config(preset: str, **overrides) -> DewConfig: if preset not in PRESETS: raise KeyError(f"unknown preset {preset!r}; choose from {sorted(PRESETS)}") return DewConfig(**{**PRESETS[preset], **overrides})
def count_params(cfg: DewConfig) -> int: from .modeling_dew import DewForCausalLM, DewForMaskedLM with torch.device("meta"): m = DewForCausalLM(cfg) if cfg.causal else DewForMaskedLM(cfg) if cfg.tie_word_embeddings: m.lm_head.weight = m.model.embed_tokens.weight return sum(p.numel() for p in m.parameters())
def fit_params(cfg: DewConfig, target: int, multiple: int = 8) -> DewConfig: """Resize the thinkers so the whole model has about `target` parameters. Nap thinker: expert width (shared expert = 2x expert width). Dense: intermediate size.""" key = "expert_intermediate_size" if cfg.ffn == "nap" else "intermediate_size"
def with_width(w): kw = cfg.to_dict() kw[key] = int(w) if cfg.ffn == "nap": kw["shared_intermediate_size"] = int(2 * w) for k in ("model_type", "transformers_version", "architectures"): kw.pop(k, None) return DewConfig(**kw)
a, b = 64, 128 na, nb = count_params(with_width(a)), count_params(with_width(b)) slope = (nb - na) / (b - a) w = max(multiple, round((a + (target - na) / slope) / multiple) * multiple) return with_width(w)123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346{ "masked_char_acc": 0.7043636765041715, "per_lang": { "vie_Latn": { "loss": 0.9058294002948358, "acc": 0.7522859517871987 }, "ind_Latn": { "loss": 0.5248599286289485, "acc": 0.8428927680798005 }, "zsm_Latn": { "loss": 0.5540564989706723, "acc": 0.8354114713216958 }, "fil_Latn": { "loss": 0.6683329315058707, "acc": 0.7963424771404821 }, "uzn_Latn": { "loss": 0.7047844662432461, "acc": 0.7940565253532834 }, "jav_Latn": { "loss": 1.0460263931642249, "acc": 0.6990856192851206 }, "ceb_Latn": { "loss": 0.5346989175823462, "acc": 0.8370739817123857 }, "bew_Latn": { "loss": 1.0424323712203865, "acc": 0.707190357439734 }, "sun_Latn": { "loss": 0.6788817141716023, "acc": 0.8002909393183707 }, "hin_Latn": { "loss": 0.8513629053992623, "acc": 0.7489609310058188 }, "mww_Latn": { "loss": 0.624284016521197, "acc": 0.8171238570241064 }, "mri_Latn": { "loss": 0.6817182000240285, "acc": 0.791978387364921 }, "haw_Latn": { "loss": 0.5797825382831983, "acc": 0.82356608478803 }, "hif_Latn": { "loss": 0.7601489846347672, "acc": 0.7795095594347464 }, "smo_Latn": { "loss": 0.6943719091756286, "acc": 0.7915627597672485 }, "lus_Latn": { "loss": 0.9118248486855777, "acc": 0.7283873649210307 }, "nrm_Latn": { "loss": 0.6886736710469918, "acc": 0.8156691604322527 }, "cnh_Latn": { "loss": 0.8448799367953813, "acc": 0.7497921862011637 }, "urd_Latn": { "loss": 0.9441077279132897, "acc": 0.734621778886118 }, "tel_Latn": { "loss": 1.0255288292939526, "acc": 0.705527847049044 }, "uig_Latn": { "loss": 1.2306819417926538, "acc": 0.6797589359933499 }, "tet_Latn": { "loss": 0.7170933242252442, "acc": 0.7869908561928513 }, "ben_Latn": { "loss": 1.1124831760117935, "acc": 0.6689526184538653 }, "hil_Latn": { "loss": 0.6886147667939526, "acc": 0.8027847049044057 }, "rhg_Latn": { "loss": 0.05609902043394119, "acc": 0.9825436408977556 }, "ctd_Latn": { "loss": 0.9421089407016313, "acc": 0.7213216957605985 }, "kha_Latn": { "loss": 1.0120547396465414, "acc": 0.7300970873786408 }, "ilo_Latn": { "loss": 1.1044442231872673, "acc": 0.6769087523277467 }, "fij_Latn": { "loss": 0.7090202452040472, "acc": 0.7909393183707398 }, "iba_Latn": { "loss": 0.6734091488401392, "acc": 0.8032003325020781 }, "ban_Latn": { "loss": 0.9049462931213632, "acc": 0.7335827098919369 }, "cfm_Latn": { "loss": 0.9776991846555486, "acc": 0.7130091438071487 }, "tam_Latn": { "loss": 1.0235521628870532, "acc": 0.7036575228595179 }, "pan_Latn": { "loss": 0.9852988987492207, "acc": 0.7152950955943475 }, "kac_Latn": { "loss": 0.7873636627831463, "acc": 0.764546965918537 }, "bbc_Latn": { "loss": 0.9828711911627181, "acc": 0.7136325852036576 }, "nan_Latn": { "loss": 1.6305323320929448, "acc": 0.5756442227763924 }, "tcz_Latn": { "loss": 1.2007840506156484, "acc": 0.6440149625935162 }, "pck_Latn": { "loss": 1.2240815054086538, "acc": 0.6350769230769231 }, "mal_Latn": { "loss": 1.2960056929616064, "acc": 0.6151288445552785 }, "san_Latn": { "loss": 1.9492780512029475, "acc": 0.5 }, "gom_Latn": { "loss": 1.3485651309551643, "acc": 0.6128428927680798 }, "ium_Latn": { "loss": 1.0594400229894014, "acc": 0.6629260182876143 }, "pam_Latn": { "loss": 0.33771058904658924, "acc": 0.9006650041562759 }, "mni_Latn": { "loss": 1.6324356961841426, "acc": 0.5278925619834711 }, "ton_Latn": { "loss": 0.8930647827046966, "acc": 0.7468827930174564 }, "war_Latn": { "loss": 0.9209453167138619, "acc": 0.7362459546925566 }, "bis_Latn": { "loss": 0.7394309629371564, "acc": 0.7819181429444105 }, "ory_Latn": { "loss": 1.1678441428979633, "acc": 0.6571072319201995 }, "pon_Latn": { "loss": 1.427913328568343, "acc": 0.6020371044016006 }, "bjn_Latn": { "loss": 0.8314327198767404, "acc": 0.764546965918537 }, "hmr_Latn": { "loss": 1.1289308285284898, "acc": 0.6796407185628742 }, "kaa_Latn": { "loss": 1.5540215740672012, "acc": 0.5364212193190816 }, "npi_Latn": { "loss": 1.161948745486544, "acc": 0.6668744804655029 }, "bgp_Latn": { "loss": 1.0239073134221737, "acc": 0.7265170407315046 }, "mar_Latn": { "loss": 1.4782940890171858, "acc": 0.5808807733619764 }, "dtp_Latn": { "loss": 1.3931886593024887, "acc": 0.5988023952095808 }, "jpn_Latn": { "loss": 0.6776492403431525, "acc": 0.8079800498753117 }, "kan_Latn": { "loss": 1.5667742815569299, "acc": 0.5380138232084394 }, "ace_Latn": { "loss": 1.0298519036708733, "acc": 0.6974358974358974 }, "btx_Latn": { "loss": 1.4469478401595246, "acc": 0.5958083832335329 }, "gil_Latn": { "loss": 1.0695436498272548, "acc": 0.6685369908561929 }, "hak_Latn": { "loss": 1.801903740202565, "acc": 0.5618892508143323 }, "tpi_Latn": { "loss": 0.9127195389544378, "acc": 0.7418032786885246 }, "pau_Latn": { "loss": 1.6753812269731, "acc": 0.5056818181818182 }, "hnj_Latn": { "loss": 1.0363337940083015, "acc": 0.7032967032967034 }, "mah_Latn": { "loss": 1.46378743083697, "acc": 0.5918536990856192 }, "cmn_Latn": { "loss": 1.6343968967833284, "acc": 0.540226546616323 }, "pag_Latn": { "loss": 0.8483044670623483, "acc": 0.8407766990291262 }, "raw_Latn": { "loss": 1.8134347562084372, "acc": 0.5854114713216958 }, "asm_Latn": { "loss": 1.82303614870331, "acc": 0.4970414201183432 }, "rar_Latn": { "loss": 0.8694072176080434, "acc": 0.7340884573894283 }, "meo_Latn": { "loss": 1.3801858066422485, "acc": 0.6190773067331671 }, "guj_Latn": { "loss": 1.330562418157404, "acc": 0.6246448863636364 }, "mak_Latn": { "loss": 1.5426558991392216, "acc": 0.5868263473053892 }, "cbk_Latn": { "loss": 1.371183583434199, "acc": 0.6014084507042253 }, "min_Latn": { "loss": 0.8416489801700177, "acc": 0.7603906899418121 }, "tah_Latn": { "loss": 1.2439290196442407, "acc": 0.6776859504132231 }, "zom_Latn": { "loss": 1.212959422732232, "acc": 0.649002493765586 }, "tsg_Latn": { "loss": 0.5271715500512595, "acc": 0.849443468072642 }, "zha_Latn": { "loss": 1.5833485427412015, "acc": 0.5941747572815534 }, "mui_Latn": { "loss": 1.250241299420719, "acc": 0.6396508728179551 }, "yap_Latn": { "loss": 0.6336101618680087, "acc": 0.8352272727272727 }, "eng_Latn": { "loss": 0.5944941925784497, "acc": 0.8285536159600998 } }, "params": 15004688, "steps": 122070, "chars_trained": 7999979520, "group": "latn-asia-pacific", "source_run": "base-latn-asia-pacific-dew-1-enc-hybrid-full-s0"}123version https://git-lfs.github.com/spec/v1oid sha256:93d444954cf82aaa1d8bc9657ffc705d75a3a6f6ffdde3de9329456e527714e0size 600318401234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798run,task,label,word_acc,words,punct_f1,case_f1base-latn-asia-pacific-dew-1-enc-hybrid-full-s0,marks,vie_Latn,0.8096541042849767,38740.0,,base-latn-asia-pacific-dew-1-enc-hybrid-full-s0,marks,sun_Latn,0.9772857964347326,31302.0,,base-latn-asia-pacific-dew-1-enc-hybrid-full-s0,marks,mri_Latn,0.9747973100370813,47733.0,,base-latn-asia-pacific-dew-1-enc-hybrid-full-s0,marks,haw_Latn,0.9888533925967081,57596.0,,base-latn-asia-pacific-dew-1-enc-hybrid-full-s0,marks,smo_Latn,0.9964435547415721,46957.0,,base-latn-asia-pacific-dew-1-enc-hybrid-full-s0,marks,nrm_Latn,0.9536063791228706,22072.0,,base-latn-asia-pacific-dew-1-enc-hybrid-full-s0,marks,uig_Latn,0.963422922459067,16185.0,,base-latn-asia-pacific-dew-1-enc-hybrid-full-s0,marks,tet_Latn,0.9489694737587648,28238.0,,base-latn-asia-pacific-dew-1-enc-hybrid-full-s0,marks,nan_Latn,0.5749248245907117,11972.0,,base-latn-asia-pacific-dew-1-enc-hybrid-full-s0,marks,san_Latn,1.0,150.0,,base-latn-asia-pacific-dew-1-enc-hybrid-full-s0,marks,ton_Latn,0.9608695652173913,12190.0,,base-latn-asia-pacific-dew-1-enc-hybrid-full-s0,marks,kaa_Latn,0.996734693877551,1225.0,,base-latn-asia-pacific-dew-1-enc-hybrid-full-s0,punct,vie_Latn,,,0.25956166738289643,0.6408045977011494base-latn-asia-pacific-dew-1-enc-hybrid-full-s0,punct,ind_Latn,,,0.3823088455772114,0.6701872299567931base-latn-asia-pacific-dew-1-enc-hybrid-full-s0,punct,zsm_Latn,,,0.4093216428241809,0.6931286936579342base-latn-asia-pacific-dew-1-enc-hybrid-full-s0,punct,fil_Latn,,,0.38823529411764707,0.7266677757444685base-latn-asia-pacific-dew-1-enc-hybrid-full-s0,punct,uzn_Latn,,,0.5261762756792577,0.5051194539249146base-latn-asia-pacific-dew-1-enc-hybrid-full-s0,punct,jav_Latn,,,0.16463595839524517,0.6633584755855498base-latn-asia-pacific-dew-1-enc-hybrid-full-s0,punct,ceb_Latn,,,0.4589178356713427,0.6922689498866784base-latn-asia-pacific-dew-1-enc-hybrid-full-s0,punct,bew_Latn,,,0.28331758034026466,0.38756613756613756base-latn-asia-pacific-dew-1-enc-hybrid-full-s0,punct,sun_Latn,,,0.289564742305591,0.5197551474680022base-latn-asia-pacific-dew-1-enc-hybrid-full-s0,punct,hin_Latn,,,0.5722702278083268,0.4854368932038835base-latn-asia-pacific-dew-1-enc-hybrid-full-s0,punct,mww_Latn,,,0.337524557956778,0.6855005570587299base-latn-asia-pacific-dew-1-enc-hybrid-full-s0,punct,mri_Latn,,,0.42409972299168974,0.6267230790227925base-latn-asia-pacific-dew-1-enc-hybrid-full-s0,punct,haw_Latn,,,0.4769176553506402,0.7184838160136287base-latn-asia-pacific-dew-1-enc-hybrid-full-s0,punct,hif_Latn,,,0.506926952141058,0.5843901995545252base-latn-asia-pacific-dew-1-enc-hybrid-full-s0,punct,smo_Latn,,,0.32606108687028956,0.6841555729574523base-latn-asia-pacific-dew-1-enc-hybrid-full-s0,punct,lus_Latn,,,0.5310215166074785,0.791010498687664base-latn-asia-pacific-dew-1-enc-hybrid-full-s0,punct,nrm_Latn,,,0.2875564152159897,0.6789571997076261base-latn-asia-pacific-dew-1-enc-hybrid-full-s0,punct,cnh_Latn,,,0.573121840683284,0.7683314627759072base-latn-asia-pacific-dew-1-enc-hybrid-full-s0,punct,urd_Latn,,,0.4235565819861432,0.470288428124638base-latn-asia-pacific-dew-1-enc-hybrid-full-s0,punct,tel_Latn,,,0.45334154604250076,0.4308516835605266base-latn-asia-pacific-dew-1-enc-hybrid-full-s0,punct,uig_Latn,,,0.57017222425797,0.18940248027057496base-latn-asia-pacific-dew-1-enc-hybrid-full-s0,punct,tet_Latn,,,0.45171202809482003,0.7566459547754788base-latn-asia-pacific-dew-1-enc-hybrid-full-s0,punct,ben_Latn,,,0.26346911957950064,0.38003736322391246base-latn-asia-pacific-dew-1-enc-hybrid-full-s0,punct,hil_Latn,,,0.679098679098679,0.7302316676239708base-latn-asia-pacific-dew-1-enc-hybrid-full-s0,punct,rhg_Latn,,,0.24517212426532325,0.6304222093695778base-latn-asia-pacific-dew-1-enc-hybrid-full-s0,punct,ctd_Latn,,,0.6664,0.8057809330628803base-latn-asia-pacific-dew-1-enc-hybrid-full-s0,punct,kha_Latn,,,0.27906976744186046,0.4847161572052402base-latn-asia-pacific-dew-1-enc-hybrid-full-s0,punct,ilo_Latn,,,0.5116279069767442,0.8275229357798165base-latn-asia-pacific-dew-1-enc-hybrid-full-s0,punct,fij_Latn,,,0.4310189359783589,0.7431221020092735base-latn-asia-pacific-dew-1-enc-hybrid-full-s0,punct,iba_Latn,,,0.6656891495601173,0.8600241337700396base-latn-asia-pacific-dew-1-enc-hybrid-full-s0,punct,ban_Latn,,,0.27453769559032715,0.6701074068907797base-latn-asia-pacific-dew-1-enc-hybrid-full-s0,punct,cfm_Latn,,,0.5012135922330098,0.7715968586387435base-latn-asia-pacific-dew-1-enc-hybrid-full-s0,punct,tam_Latn,,,0.43546099290780144,0.5199206778438795base-latn-asia-pacific-dew-1-enc-hybrid-full-s0,punct,pan_Latn,,,0.3251833740831296,0.7318087318087318base-latn-asia-pacific-dew-1-enc-hybrid-full-s0,punct,kac_Latn,,,0.36753100338218714,0.6478227654698243base-latn-asia-pacific-dew-1-enc-hybrid-full-s0,punct,bbc_Latn,,,0.3705900718076803,0.4453459889773423base-latn-asia-pacific-dew-1-enc-hybrid-full-s0,punct,nan_Latn,,,0.2458001768346596,0.6186115214180207base-latn-asia-pacific-dew-1-enc-hybrid-full-s0,punct,tcz_Latn,,,0.5601834161253344,0.7926542814435191base-latn-asia-pacific-dew-1-enc-hybrid-full-s0,punct,pck_Latn,,,0.46790890269151136,0.6450417052826691base-latn-asia-pacific-dew-1-enc-hybrid-full-s0,punct,mal_Latn,,,0.24272162250572457,0.38411944350186633base-latn-asia-pacific-dew-1-enc-hybrid-full-s0,punct,san_Latn,,,0.0,0.0base-latn-asia-pacific-dew-1-enc-hybrid-full-s0,punct,gom_Latn,,,0.40461215932914046,0.5675623429344674base-latn-asia-pacific-dew-1-enc-hybrid-full-s0,punct,ium_Latn,,,0.008032128514056224,0.6990291262135923base-latn-asia-pacific-dew-1-enc-hybrid-full-s0,punct,pam_Latn,,,0.8896174863387978,0.6783042394014963base-latn-asia-pacific-dew-1-enc-hybrid-full-s0,punct,mni_Latn,,,0.18867924528301888,0.6178861788617886base-latn-asia-pacific-dew-1-enc-hybrid-full-s0,punct,ton_Latn,,,0.44035087719298244,0.5356760231412042base-latn-asia-pacific-dew-1-enc-hybrid-full-s0,punct,war_Latn,,,0.3225806451612903,0.5971223021582733base-latn-asia-pacific-dew-1-enc-hybrid-full-s0,punct,bis_Latn,,,0.4188034188034188,0.6635730858468677base-latn-asia-pacific-dew-1-enc-hybrid-full-s0,punct,ory_Latn,,,0.31070889894419307,0.4141132776230269base-latn-asia-pacific-dew-1-enc-hybrid-full-s0,punct,pon_Latn,,,0.3787878787878788,0.45858761987794244base-latn-asia-pacific-dew-1-enc-hybrid-full-s0,punct,bjn_Latn,,,0.3432586149213784,0.720753729390212base-latn-asia-pacific-dew-1-enc-hybrid-full-s0,punct,hmr_Latn,,,0.717948717948718,0.8586387434554974base-latn-asia-pacific-dew-1-enc-hybrid-full-s0,punct,kaa_Latn,,,0.4897959183673469,0.631578947368421base-latn-asia-pacific-dew-1-enc-hybrid-full-s0,punct,npi_Latn,,,0.5153550863723608,0.3803655781474635base-latn-asia-pacific-dew-1-enc-hybrid-full-s0,punct,bgp_Latn,,,0.3465045592705167,0.374496644295302base-latn-asia-pacific-dew-1-enc-hybrid-full-s0,punct,mar_Latn,,,0.2631578947368421,0.5113122171945701base-latn-asia-pacific-dew-1-enc-hybrid-full-s0,punct,dtp_Latn,,,0.7368421052631579,0.8260869565217391base-latn-asia-pacific-dew-1-enc-hybrid-full-s0,punct,jpn_Latn,,,0.4710017574692443,0.8111718275652702base-latn-asia-pacific-dew-1-enc-hybrid-full-s0,punct,kan_Latn,,,0.08280254777070063,0.4074074074074074base-latn-asia-pacific-dew-1-enc-hybrid-full-s0,punct,ace_Latn,,,0.27218934911242604,0.6379647749510763base-latn-asia-pacific-dew-1-enc-hybrid-full-s0,punct,btx_Latn,,,0.25,0.6626506024096386base-latn-asia-pacific-dew-1-enc-hybrid-full-s0,punct,krj_Latn,,,0.0,0.7777777777777778base-latn-asia-pacific-dew-1-enc-hybrid-full-s0,punct,gil_Latn,,,0.4844290657439446,0.6640271493212669base-latn-asia-pacific-dew-1-enc-hybrid-full-s0,punct,hak_Latn,,,0.0,0.42105263157894735base-latn-asia-pacific-dew-1-enc-hybrid-full-s0,punct,tpi_Latn,,,0.4,0.8695652173913043base-latn-asia-pacific-dew-1-enc-hybrid-full-s0,punct,pau_Latn,,,0.6842105263157895,0.6739130434782609base-latn-asia-pacific-dew-1-enc-hybrid-full-s0,punct,hnj_Latn,,,0.2894736842105263,0.6857142857142857base-latn-asia-pacific-dew-1-enc-hybrid-full-s0,punct,mah_Latn,,,0.20833333333333334,0.6884629838406614base-latn-asia-pacific-dew-1-enc-hybrid-full-s0,punct,cmn_Latn,,,0.08099688473520249,0.5829596412556054base-latn-asia-pacific-dew-1-enc-hybrid-full-s0,punct,pag_Latn,,,0.21052631578947367,0.4666666666666667base-latn-asia-pacific-dew-1-enc-hybrid-full-s0,punct,raw_Latn,,,0.24312333629103816,0.42742742742742745base-latn-asia-pacific-dew-1-enc-hybrid-full-s0,punct,asm_Latn,,,0.2288135593220339,0.4956268221574344base-latn-asia-pacific-dew-1-enc-hybrid-full-s0,punct,rar_Latn,,,0.5220883534136547,0.6813627254509018base-latn-asia-pacific-dew-1-enc-hybrid-full-s0,punct,meo_Latn,,,0.42376856919468336,0.1887905604719764base-latn-asia-pacific-dew-1-enc-hybrid-full-s0,punct,guj_Latn,,,0.35714285714285715,0.39base-latn-asia-pacific-dew-1-enc-hybrid-full-s0,punct,mak_Latn,,,0.38596491228070173,0.5714285714285714base-latn-asia-pacific-dew-1-enc-hybrid-full-s0,punct,cbk_Latn,,,0.4,0.05360333531864205base-latn-asia-pacific-dew-1-enc-hybrid-full-s0,punct,min_Latn,,,0.4133112269066793,0.6442273323007268base-latn-asia-pacific-dew-1-enc-hybrid-full-s0,punct,tah_Latn,,,0.2727272727272727,0.33153638814016173base-latn-asia-pacific-dew-1-enc-hybrid-full-s0,punct,zom_Latn,,,0.687246963562753,0.855574812247256base-latn-asia-pacific-dew-1-enc-hybrid-full-s0,punct,tsg_Latn,,,0.4642857142857143,0.4base-latn-asia-pacific-dew-1-enc-hybrid-full-s0,punct,zha_Latn,,,0.9050279329608939,0.8848167539267016base-latn-asia-pacific-dew-1-enc-hybrid-full-s0,punct,mui_Latn,,,0.3995243757431629,0.2761904761904762base-latn-asia-pacific-dew-1-enc-hybrid-full-s0,punct,yap_Latn,,,0.11764705882352941,0.25862068965517243base-latn-asia-pacific-dew-1-enc-hybrid-full-s0,punct,eng_Latn,,,0.42729970326409494,0.80788804071246821{"vocab": ["<pad>", "<unk>", "<mask>", "<eot>", "<|lang:vie_Latn|>", "<|lang:ind_Latn|>", "<|lang:zsm_Latn|>", "<|lang:fil_Latn|>", "<|lang:uzn_Latn|>", "<|lang:jav_Latn|>", "<|lang:ceb_Latn|>", "<|lang:bew_Latn|>", "<|lang:sun_Latn|>", "<|lang:hin_Latn|>", "<|lang:mww_Latn|>", "<|lang:mri_Latn|>", "<|lang:haw_Latn|>", "<|lang:hif_Latn|>", "<|lang:smo_Latn|>", "<|lang:lus_Latn|>", "<|lang:nrm_Latn|>", "<|lang:cnh_Latn|>", "<|lang:urd_Latn|>", "<|lang:tel_Latn|>", "<|lang:uig_Latn|>", "<|lang:tet_Latn|>", "<|lang:ben_Latn|>", "<|lang:hil_Latn|>", "<|lang:rhg_Latn|>", "<|lang:ctd_Latn|>", "<|lang:kha_Latn|>", "<|lang:ilo_Latn|>", "<|lang:fij_Latn|>", "<|lang:iba_Latn|>", "<|lang:ban_Latn|>", "<|lang:cfm_Latn|>", "<|lang:tam_Latn|>", "<|lang:bcl_Latn|>", "<|lang:pan_Latn|>", "<|lang:kac_Latn|>", "<|lang:bbc_Latn|>", "<|lang:nan_Latn|>", "<|lang:tcz_Latn|>", "<|lang:pck_Latn|>", "<|lang:mal_Latn|>", "<|lang:san_Latn|>", "<|lang:gom_Latn|>", "<|lang:ium_Latn|>", "<|lang:pam_Latn|>", "<|lang:mni_Latn|>", "<|lang:meu_Latn|>", "<|lang:ton_Latn|>", "<|lang:mps_Latn|>", "<|lang:war_Latn|>", "<|lang:bis_Latn|>", "<|lang:ory_Latn|>", "<|lang:pon_Latn|>", "<|lang:bjn_Latn|>", "<|lang:bru_Latn|>", "<|lang:hmr_Latn|>", "<|lang:szy_Latn|>", "<|lang:kaa_Latn|>", "<|lang:npi_Latn|>", "<|lang:kos_Latn|>", "<|lang:bgp_Latn|>", "<|lang:ape_Latn|>", "<|lang:mar_Latn|>", "<|lang:dtp_Latn|>", "<|lang:jpn_Latn|>", "<|lang:kan_Latn|>", "<|lang:hmo_Latn|>", "<|lang:ace_Latn|>", "<|lang:tuc_Latn|>", "<|lang:btx_Latn|>", "<|lang:krj_Latn|>", "<|lang:gil_Latn|>", "<|lang:hak_Latn|>", "<|lang:mjw_Latn|>", "<|lang:tpi_Latn|>", "<|lang:ppk_Latn|>", "<|lang:pau_Latn|>", "<|lang:ami_Latn|>", "<|lang:hnj_Latn|>", "<|lang:mah_Latn|>", "<|lang:trv_Latn|>", "<|lang:cmn_Latn|>", "<|lang:pag_Latn|>", "<|lang:raw_Latn|>", "<|lang:jra_Latn|>", "<|lang:asm_Latn|>", "<|lang:njo_Latn|>", "<|lang:rar_Latn|>", "<|lang:meo_Latn|>", "<|lang:chk_Latn|>", "<|lang:cha_Latn|>", "<|lang:guj_Latn|>", "<|lang:mak_Latn|>", "<|lang:cbk_Latn|>", "<|lang:min_Latn|>", "<|lang:tah_Latn|>", "<|lang:zom_Latn|>", "<|lang:hui_Latn|>", "<|lang:rug_Latn|>", "<|lang:tsg_Latn|>", "<|lang:bts_Latn|>", "<|lang:nia_Latn|>", "<|lang:mad_Latn|>", "<|lang:zha_Latn|>", "<|lang:mui_Latn|>", "<|lang:yap_Latn|>", "<|lang:zyb_Latn|>", "<|lang:kpg_Latn|>", "<|lang:vap_Latn|>", "<|lang:tay_Latn|>", "<|lang:eng_Latn|>", " ", "a", "i", "n", "e", "t", "o", "u", "h", "r", "l", "s", "k", "g", "m", "d", "p", "b", "y", "c", ".", ",", "w", "v", "j", "\n", "f", "-", "A", "S", "M", "z", "T", "P", "K", "N", "I", "0", "1", "B", "q", "C", "ā", "D", "2", "x", "H", "ʻ", "L", "E", "'", "R", "O", "’", "G", "é", "U", ")", "(", ":", "3", "J", "F", "|", "5", "4", "9", "à", "ơ", "V", "á", "W", "ı", "6", "8", "â", "7", "\"", "Y", "?", "!", "“", "”", "ê", "/", "ó", "‘", "ô", "ṃ", "è", "đ", "ō", "ū", "ī", "ü", "í", "…", "ì", ";", "̍", "Z", "ă", "ư", "ä", "ñ", "ú", "ò", "ö", "–", "ē", "ⁿ", "ś", "Q", "ṣ", "ù", "ḥ", "[", "]", "ṇ", "_", "ạ", "ṭ", "ế", "X", "î", "ƀ", "ả", "ŭ", "ệ", "ë", "͘", "ấ", "*", "ộ", "ớ", "̄", "û", "ï", "ố", "=", "ờ", "的", "`", "ề", "ể", "^", "ợ", "ṛ", "̆", "%", "ा", "ĭ", "ŏ", "ủ", "&", ",", "ậ", "ầ", "ǵ", "ị", "»", "ọ", "ã", "č", "ữ", "्", "ń", "र", "ự", "—", "ə", "ứ", ">", "ş", "±", "ḍ", "#", "ụ", "ắ", "ṉ", "̱", "न", "ồ", "«", "̂", "ở", "+", "ç", "å", "े", "क", "ŋ", "̀", "中", "用", "त", "ğ", "@", "$", "Đ", "ḡ", "া", "म", "是", "\\", "ि", "и", "ặ", "स", "ổ", "ا", "·", "ⱪ", "ừ", "ǝ", "õ", "ę", "、", "य", "ũ", "文", "么", "~", "。", "ṳ", "一", "ी", "ह", "व", "ą", "ẽ", "प", "ে", "ử", "ĕ", "ल", "<", "ḷ", "个", "ỏ", "ل", "ỉ", "ं", "•", "द", "ý", "有", "র", "ो", "ु", "½", "ṅ", "š", "É", "在", "和", "л", "数", "ằ", "什", "°", "ẩ", "如", "我", "ি", "்", "ỗ", "ƣ", "这", "ĩ", "ẫ", "و", "⚓", "ễ", "代", "Ñ", "×", "ʹ", "ẻ", "?", "ब", "ẹ", "", "ম", "为", "{", "使", "ग", "̠", ":", "Ƀ", "下", "ن", "不", "\b", "ক", "ব", "م", "Ơ", "Ä", "行", "ر", "\u0007", "何", "о", "ज", "}", "َ", "以", "ন", "ল", "д", "网", "ø", "介", "¯", "²", "п", "ǫ", "绍", "Ì", "க", "দ", "ⱨ", "ʼ", "生", "出", "ی", "च", "а", "श", "要", ")", "į", "件", "্", "ু", "ै", "(", "怎", "е", "भ", "်", "上", "ы", "Ā", "‚", "", "җ", "´", "了", "法", "可", "吗", "ب", "孕", "成", "写", "ت", "চ", "്", "新", "б", "到", "।", "码", "能", "定", "µ", "́", "\u0006", "æ", "ي", "作", "ỡ", "", "时", "း", "س", "Á", "高", "对", "я", "த", "ǹ", "游", "方", "н", "Ü", "字", "ம", "分", "з", "„", "য", "ỹ", "স", "ো", "Â", "ɵ", "据", "人", "戏", "়", "大", "প", "心", "现", "अ", "Т", "√", "т", "�", "ष", "Í", "后", "ା", "ع", "你", "请", "本", "名", "ာ", "ି", "й", "表", "ه", "面", "ত", "意", "点", "置", "ி", "の", "¬", "º", "加", "取", "Ê", "с", "і", "आ", "ေ", "实", "给", "р", "类", "ா", "语", "ট", "\u0005", "್", "义", "ų", "€", "ک", "İ", "入", "Ó", "示", "Ô", "里", "ẳ", "က", "子", "د", "్", "ч", "发", "英", "い", "并", "ध", "ट", "আ", "理", "解", "将", "ः", "式", "³", "ß", "设", "果", "于", "ِ", "思", "ு", "内", "छ", "应", "ỳ", "会", "ț", "公", "图", "£", "来", "Ă", "接", "程", "ை", "ု", "ण", "日", "鹰", "进", "ہ", "ए", "ు", "通", "与", "殖", "ू", "函", "မ", "型", "格", "别", "È", "哪", "多", "к", "င", "ର", "关", "थ", "গ", "国", "值", "化", "΄", "美", "ー", "ŵ", "ļ", "地", "特", "性", "Ū", "开", "À", "ိ", "္", "存", "ख", "区", "没", "ے", "列", "回", "错", "ನ", "年", "ॊ", "→", "改", "た", "କ", "例", "合", "体", "需", "提", "安", "量", "ح", "资", "ಿ", "ف", "उ", "ು", "动", "些", "ỷ", "过", "ി", "包", "¦", "ْ", "ਾ", "目", "ُ", "细", "を", "ड", "™", "େ", "в", "度", "前", "问", "ж", "️", "ق", "学", "原", "模", "家", "结", "题", "所", "ப", "报", "台", "单", "ന", "ి", "输", "တ", "୍", "详", "న", "ட", "ছ", "调", "容", "段", "し", "参", "🙂", "̗", "इ", "第", "工", "ပ", "ా", "န", ";", "で", "ക", "ई", "ಾ", "机", "Ə", "同", "信", "业", "词", "Ö", "款", "小", "样", "计", "●", "最", "м", "ன", "查", "ш", "司", "す", "Ṭ", "女", "标", "建", "て", "部", "明", "শ", "闻", "其", "自", "转", "る", "编", "у", "ˈ", "に", "ّ", "算", "系", "ج", "获", "জ", "元", "指", "ମ", "序", "该", "优", "Ş", "な", "好", "ী", "装", "Ē", "主", "试", "制", "ン", "ു", "还", "正", "ୁ", "版", "配", "务", "ದ", "位", "¢", "ရ", "ই", "平", "求", "ك", "就", "间", "言", "重", "క", "", "句", "口", "译", "器", "都", "注", "他", "更", "者", "做", "变", "ೆ", "看", "月", "ರ", "助", "相", "组", "Ō", "比", "Ð", "வ", "は", "因", "说", "息", "们", "项", "ى", "ల", "之", "库", "ɱ", "ृ", "种", "换", "海", "হ", "ం", "😀", "产", "Ľ", "运", "Ç", "ବ", "फ", "载", "ြ", "′", "管", "″", "全", "ಮ", "选", "等", "道", "ᴄ", "路", "事", "持", "讯", "", "খ", "片", "修", "当", "得", "打", "那", "ভ", "集", "ħ", "ാ", "品", "ସ", "এ", "أ", "天", "经", "无", "©", "号", "基", "ள", "ま", "စ", "ர", "但", "三", "ড", "然", "符", "ಕ", "လ", "令", "ಗ", "显", "知", "民", "と", "期", "想", "线", "ौ", "服", "ੇ", "ة", "ತ", "否", "ю", "空", "ర", "功", "读", "స", "़", "國", "价", "ї", "Һ", "支", "处", "保", "ွ", "翻", "ꞌ", "水", "源", "သ", "ਰ", "ନ", "帮", "外", "少", "✔", "Ã", "ص", "常", "物", "引", "命", "¡", "两", "か", "ز", "或", "统", "ல", "ش", "像", "ং", "次", "每", "ь", "ச", "执", "析", "》", "流", "が", "创", "ହ", "构", "ṁ", "州", "ത", "金", "←", "ф", "›", "去", "《", "只", "也", "力", "含", "െ", "技", "œ", "具", "科", "及", "ц", "西", "Ï", "已", "ੀ", "ଲ", "യ", "从", "Ú", "南", "真", "့", "利", "车", "ய", "ں", "ട", "电", "အ", "ģ", "ँ", "族", "色", "ス", "ಲ", "پ", "呢", "把", "手", "传", "条", "っ", "ျ", "،", "误", "イ", "く", "!", "势", "举", "情", "ವ", "ẵ", "音", "ခ", "市", "户", "😂", "根", "收", "ര", "ち", "「", "‟", "త", "教", "复", "长", "э", "完", "Ę", "找", "育", "述", "」", "ª", "ਦ", "直", "确", "话", "మ", "怀", "测", "返", "থ", "ಯ", "二", "う", "さ", "添", "ਹ", "释", "↑", "投", "效", "語", "മ", "ಸ", "放", "Ḡ", "®", "Į", "它", "ル", "ধ", "அ", "★", "始", "ద", "ପ", "ん", "篇", "首", "ီ", "ţ", "端", "會", "而", "向", "ண", "布", "", "失", "象", "页", "导", "പ", "整", "态", "录", "ਨ", "起", "被", "ె", "😭", "斯", "交", "论", "ッ", "非", "除", "站", "推", "ト", "北", "增", "印", "ତ", "خ", "學", "ଗ", "ৰ", "ം", "ও", "औ", "连", "ਸ", "г", "按", "🙏", "立", "环", "ھ", "̤", "α", "ట", "گ", "ਿ", "ǒ", "Ò", "ే", "世", "节", "來", "ୋ", "消", "ప", "れ", "Î", "〈", "〉", "ಂ", "ǎ", "供", "展", "属", "ဲ", "ئ", "ံ", "素", "山", "ല", "డ", "✪", "任", "Č", "ယ", "址", "ร", "˜", "形", "此", "గ", "由", "ച", "串", "إ", "ク", "ଣ", "断", "ɛ", "ో", "认", "Ș", "步", "വ", "り", "拉", "界", "送", "商", "告", "ι", "场", "备", "决", "ਤ", "政", "操", "こ", "询", "ら", "า", "ଆ", "ਲ", "先", "", "ਕ", "检", "‑", "ୀ", "ジ", "着", "启", "官", "घ", "చ", "", "†", "阿", "⸤", "ழ", "П", "¸", "き", "Ⱨ", "ǐ", "深", "再", "径", "ᴠ", "ठ", "ಹ", "影", "だ", "", "ந", "অ", "达", "щ", "简", "ಳ", "视", "万", "ط", "¿", "总", "ラ", "候", "让", "ஆ", "反", "伊", "级", "వ", "時", "¤", "则", "Ư", "章", "ė", "客", "率", "ଉ", "术", "头", "ଭ", "未", "清", "京", "造", "亚", "ူ", "历", "झ", "😊", "¹", "Ě", "Ī", "几", "广", "排", "共", "Å", "ě", "ည", "𝐚", "ଜ", "റ", "括", "ಬ", "ढ", "ٹ", "联", "德", "ᴜ", "准", "案", "习", "ಡ", "研", "记", "规", "限", "あ", "索", "書", "牌", "且", "证", "Ở", "验", "巴", "移", "博", "今", "声", "活", "败", "球", "ষ", "ア", "感", "很", "儿", "卡", "状", "Ả", "门", "ذ", "х", "ਜ", "考", "も", "ଁ", "♥", "股", "识", "■", "您", "ှ", "白", "乐", "著", "称", "判", "無", "❤", "四", "克", "リ", "ੰ", "份", "域", "东", "键", "训", "ਮ", "频", "员", "择", "画", "қ", "描", "百", "火", "致", "Ḍ", "ဖ", "照", "身", "ǿ", "史", "光", "太", "适", "块", "ੁ", "ŗ", "低", "ெ", "ണ", "初", "控", "究", "讲", "ᴏ", "气", "预", "ଡ", "ထ", "各", "【", "シ", "ˊ", "母", "Ż", "干", "為", "才", "十", "め", "境", "响", "И", "社", "热", "ਂ", "】", "ါ", "景", "അ", "况", "费", "後", "办", "辑", "Õ", "宝", "Ø", "ဆ", "仔", "‹", "专", "带", "😛", "غ", "−", "质", "ဒ", "际", "框", "ଇ", "お", "話", "ﷺ", "ञ", "脚", "江", "料", "链", "食", "ള", "超", "น", "微", "差", "异", "ଦ", "⦁", "ض", "℃", "奇", "Ɩ", "Д", "王", "ː", "個", "快", "啥", "ਪ", "ஸ", "ਵ", "అ", "软", "福", "♡", "星", "這", "ł", "ド", "离", "密", "چ", "ே", "え", "易", "删", "架", "§", "插", "つ", "强", "速", "ા", "య", "婴", "访", "花", "μ", "¨", "ロ", "压", "☆", "Б", "阳", "ీ", "カ", "神", "较", "π", "よ", "』", "止", "亞", "似", "签", "А", "സ", "港", "略", "Ù", "উ", "ੱ", "权", "至", "ਬ", "タ", "け", "『", "议", "随", "近", "汇", "老", "ോ", "香", "望", "替", "や", "😉", "ಪ", "ৌ", "范", "希", "华", "😁", "Û", "ء", "آ", "治", "角", "υ", "棋", "ফ", "周", "院", "受", "・", "😍", "免", "维", "局", "內", "张", "ੋ", "Җ", "依", "演", "₱", "书", "¥", "必", "報", "植", "ಶ", "某", "降", "志", "ଟ", "ม", "フ", "Ë", "Ğ", "五", "落", "彩", "๐", "络", "城", "风", "¼", "林", "ḳ", "购", "၊", "假", "储", "►", "默", "С", "レ", "男", "足", "私", "コ", "ث", "😎", "‐", "ೇ", "群", "̧", "帝", "爱", "练", "ੂ", "ṝ", "买", "", "击", "哈", "答", "续", "ิ", "グ", "歌", "典", "馬", "", "Ấ", "ท", "𝐢", "核", "嘛", "均", "ঘ", "ɔ", "ſ", "雅", "若", "套", "汽", "ଅ", "春", "せ", "遍", "板", "采", "材", "λ", "記", "ਆ", "住", "康", "ଙ", "ć", "デ", "精", "策", "Ṃ", "ĝ", "♪", "マ", "ョ", "灣", "過", "-", "؛", "ก", "ڈ", "ಟ", "波", "ર", "省", "𝗮", "動", "Ι", "東", "武", "批", "ற", "ĉ", "バ", "ೊ", "亿", "拟", "羅", "ऽ", "間", "み", "เ", "校", "健", "ങ", "围", "尔", "ς", "プ", "ɕ", "○", "ビ", "升", "吧", "Ḷ", "𝐧", "講", "企", "🏻", "ஓ", "テ", "另", "🤣", "ङ", "ঠ", "そ", "协", "册", "层", "愛", "於", "底", "എ", "ॉ", "ଶ", "红", "顺", "登", "马", "ோ", "י", "普", "票", "盘", "¾", "➥", "訊", "己", "又", "即", "േ", "ଳ", "อ", "₹", "எ", "ਣ", "開", "夹", "👍", "ဝ", "观", "現", "献", "黑", "焰", "ÿ", "▪", "稿", "济", "评", "六", "她", "医", "チ", "曲", "ǔ", "汉", "河", "充", "Ý", "ย", "概", "责", "ⓘ", "ਗ", "見", "左", "𝐞", "இ", "互", "ῆ", "對", "聚", "颜", "ž", "⇒", "Ⱪ", "师", "蘭", "掉", "边", "负", "领", "ェ", "双", "右", "Š", "😅", "長", "士", "诉", "待", "洲", "监", "‡", "付", "區", "府", "划", "妈", "播", "宁", "邮", "№", "贝", "ņ", "ೂ", "永", "ဘ", "喜", "尼", "约", "Ế", "М", "ூ", "ಜ", "業", "融", "經", "พ", "古", "切", "缩", "绘", "屏", "😆", "ν", "归", "缺", "货", "继", "虚", "ଧ", "😘", "บ", "ಅ", "背", "越", "ャ", "ブ", "团", "截", "", "彼", "ด", "ど", "课", "见", "۞", "ూ", "病", "ィ", "航", "智", "狗", "ഞ", "针", "ଖ", "ウ", "২", "ી", "ੈ", "ಆ", "員", "米", "麼", "牙", "温", "ð", "ο", "ו", "ಚ", "ೋ", "念", "缓", "居", "班", "Ạ", "১", "ਚ", "尾", "機", "玩", "", "ଥ", "玉", "ล", "ங", "ొ", "ೀ", "射", "坐", "营", "警", "短", "队", "ɪ", "阅", "听", "エ", "血", "早", "青", "頭", "們", "塞", "搜", "束", "征", "订", "☺", "ீ", "わ", "॥", "爾", "扩", "终", "Л", "", "ஃ", "防", "占", "闭", "云", "ൂ", "⸍", "吉", "故", "𝐡", "燃", "毋", "與", "叫", "發", "额", "阵", "Ố", "К", "ˇ", "場", "退", "账", "≤", "σ", "ง", "ʰ", "➻", "ঁ", "じ", "朝", "突", "窗", "矩", "👉", "Ệ", "石", "約", "η", "ะ", "ً", "ક", "%", "𝗻", "ൻ", "𝐭", "బ", "够", "销", "啊", "線", "触", "骤", "ொ", "Р", "У", "🔥", "˚", "キ", "サ", "ナ", "ď", "津", "夜", "夏", "封", "拿", "龙", "荐", "\u0011", "โ", "", "є", "メ", "÷", "ဇ", "油", "ゃ", "當", "婚", "钱", "", "Ứ", "Ž", "ő", "𝗶", "ℓ", "ళ", "味", "银", "李", "ニ", "承", "圳", "循", "ั", "่", "飞", "パ", "ဟ", "富", "署", "培", "ഇ", "档", "ે", "皇", "~", "⊙", "オ", "沙", "匹", "留", "寫", "Ủ", "ീ", "房", "ਖ", "远", "瑞", "華", "泰", "父", "庆", "ಭ", "ỵ", "友", "મ", "独", "ओ", "宣", "湖", "ಣ", "幕", "伯", "跟", "破", "撰", "护", "จ", "损", "類", "ဂ", "散", "義", "咱", "申", "饰", "谢", "战", "ɑ", "ต", "ή", "セ", "ツ", "維", "酸", "镜", "資", "欧", "赛", "Н", "꧀", "ळ", "・", "职", "寶", "染", "财", "В", "਼", "𝙖", "旅", "ঙ", "問", "附", "树", "赋", "润", "ר", "達", "委", "便", "半", "难", "ଛ", "ଏ", "Э", "ɡ", "þ", "縣", "設", "漏", "涨", "许", "满", "κ", "ꦸ", "ꦶ", "fi", "門", "Ć", "進", "宏", "塔", "實", "停", "ଚ", "¶", "𝐥", "ň", "ꦤ", "ڑ", "搭", "村", "激", "察", "峰", "倒", "娱", "览", "七", "ส", "ห", "ミ", "𝗵", "死", "走", "固", "種", "濟", "稳", "Ŗ", "帧", "", "ピ", "ဗ", "జ", "ೈ", "药", "ろ", "季", "驱", "請", "卵", "胎", "派", "♦", "З", "ત", "售", "苏", "ർ", "႔", "ょ", "卓", "却", "般", "钟", "ଝ", "Ф", "ऊ", "漢", "黄", "探", "珠", "風", "木", "歷", "盖", "ণ", "傳", "幅", "ঢ", "島", "˝", "街", "久", "善", "網", "說", "編", "氣", "益", "結", "計", "障", "ഒ", "ଷ", "填", "😦", "①", "О", "ʃ", "─", "ワ", "菜", "ば", "补", "透", "跳", "姿", "ജ", "ൊ", "ആ", "葡", "ี", "વ", "ન", "九", "運", "店", "摩", "ਉ", "审", "將", "體", "秒", "央", "减", "逻", "赖", "②", "ダ", "Г", "ב", "ש", "ો", "😄", "ム", "ᾱ", "酒", "။", "须", "千", "番", "魔", "麻", "浪", "哥", "้", "۔", "१", "ఇ", "組", "予", "號", "距", "拼", "侧", "✅", "ノ", "眼", "ɨ", "ظ", "ୟ", "✘", "军", "谁", "土", "𝐮", "ఎ", "ఆ", "Ɵ", "川", "律", "確", "關", "觉", "θ", "્", "२", "ਅ", "ŧ", "ಎ", "િ", "圖", "禁", "忙", "冲", "滚", "ୂ", "親", "八", "紀", "洋", "媒", "魚", "總", "Ŋ", "ദ", "临", "杂", "ଯ", "ᴢ", "ช", "ـ", "ٍ", "ৈ", "ε", "🌎", "众", "ਇ", "余", "茅", "數", "係", "澳", "電", "ൽ", "仅", "宽", "钮", "ȗ", "ў", "ל", "夫", "統", "別", "途", "連", "乘", "艺", "弹", "递", "极", "ḿ", "ุ", "ไ", "ɐ", "Ț", "ഗ", "Ů", "ై", "壮", "藏", "宗", "洞", "池", "往", "雄", "毛", "祖", "享", "郑", "积", "摄", "券", "险", "础", "刷", "ה", "Æ", "ऐ", "ਡ", ".", "幻", "草", "ご", "𝐫", "罗", "節", "軍", "静", "ネ", "刚", "収", "Ś", "𝐨", "ҳ", "姓", "្", "ρ", "💔", "థ", "హ", "へ", "害", "孩", "沒", "姐", "處", "吃", "箱", "ഷ", "陆", "钢", "脑", "欢", "渲", "Ǵ", "ά", "兴", "𝙣", "ュ", "呼", "庄", "耶", "認", "撒", "室", "攻", "猫", "纪", "硬", "ヒ", "◆", "॰", "➦", "ಷ", "Ķ", "笑", "啦", "牛", "良", "阻", "Ộ", "≥", "冷", "ハ", "✓", "烧", "ဳ", "ಒ", "ּ", "瓦", "严", "昌", "施", "吸", "費", "招", "ഭ", "寸", "竞", "隐", "滤", "̣", "০", "ꦏ", "ଓ", "०", "備", "托", "养", "聖", "較", "師", "葉", "課", "兼", "晚", "延", "绝", "લ", "Ề", "😢", "Ч", "ң", "̥", "உ", "ホ", "蒙", "ਈ", "座", "祭", "恩", "混", "席", "尺", "ഴ", "芯", "宫", "奖", "轴", "绑", "ৱ", "β", "👌", "ว", "秀", "ુ", "贵", "➣", "靠", "⟩", "Œ", "ဦ", "野", "田", "荷", "楽", "净", "拆", "論", "尚", "寄", "雷", "疑", "俄", "惠", "轮", "促", "浏", "③", "", "▶", "堆", "Ħ", "𝙞", "洛", "圣", "様", "ธ", "際", "題", "逐", "拍", "樣", "裡", "聯", "嗎", "埃", "檔", "沈", "董", "纸", "泛", "卖", "ォ", "Ậ", "Е", "ё", "ં", "―", "ശ", "雨", "張", "冠", "耐", "対", "參", "罪", "邦", "車", "並", "隔", "威", "估", "ヘ", "折", "绩", "ଠ", "Ự", "ค", "ؤ", "", "ஜ", "質", "ә", "ָ", "甲", "気", "佛", "ੜ", "避", "佳", "抽", "鄉", "卷", "旋", "跌", "液", "阶", "ଂ", "擎", "Ớ", "Ờ", "ป", "ө", "ꦱ", "ガ", "锁", "园", "梦", "乎", "議", "伝", "岛", "標", "勢", "爬", "條", "鼠", "仍", "೦", "😔", "ό", "א", "ע", "午", "雪", "✧", "ূ", "術", "谷", "黃", "攏", "末", "點", "露", "泉", "漫", "莉", "Ṉ", "ί", "映", "ъ", "Х", "ꦠ", "ꦺ", "પ", "權", "ၿ", "𝐦", "৪", "ね", "趣", "督", "陳", "実", "閣", "浮", "丹", "姆", "娜", "仓", "ᴡ", "ġ", "幸", "ႏ", "𝐤", "భ", "皮", "務", "振", "園", "臺", "歡", "甘", "仙", "裝", "佇", "陈", "纳", "Ầ", "龍", "ת", "ボ", "救", "శ", "৩", "ポ", "་", "织", "乱", "丁", "堂", "抱", "詞", "倫", "授", "ൾ", "贴", "嵌", "💕", "ペ", "ٌ", "ꦁ", "ʁ", "τ", "ŝ", "𝗹", "𝗲", "ɾ", "蓝", "̋", "輯", "應", "湾", "單", "暖", "跨", "媽", "守", "倍", "勒", "租", "刻", "慢", "零", "ಇ", "尽", "虑", "综", "兰", "", "ข", "Ш", "曼", "φ", "ꦲ", "מ", "迎", "ఉ", "ష", "屋", "松", "幾", "ஒ", "ਫ", "追", "烟", "革", "粉", "準", "欲", "暗", "伙", "隊", "衣", "肥", "旧", "笔", "ଘ", "଼", "🙁", "ი", "જ", "រ", "ぐ", "丽", "々", "割", "锈", "疗", "担", "赤", "陽", "納", "萊", "項", "胞", "兩", "戰", "邊", "試", "輝", "巨", "梅", "灰", "艾", "冰", "亮", "ಧ", "杭", "拥", "缘", "圆", "税", "発", "Ọ", "💪", "毒", "Ÿ", "ា", "横", "נ", "ſt", "ၾ", "ఫ", "/", "朋", "譯", "萬", "遇", "争", "焦", "捕", "幹", "柜", "亲", "尝", "废", "朗", "Ị", "🤗", "😃", "ズ", "ৃ", "͡", "દ", "げ", "童", "び", "妇", "嘉", "環", "亦", "該", "換", "宜", "ひ", "髪", "樂", "爸", "視", "佮", "裁", "ഹ", "ഥ", "副", "辆", "Ể", "ĺ", "頂", "ู", "ե", "ω", "‒", "👇", "સ", "႕", "乡", "𝐠", "戴", "ほ", "薩", "洗", "盐", "暴", "森", "Ń", "飛", "溪", "矣", "违", "紧", "拒", "涉", "顶", "抓", "Ữ", "Ừ", "盟", "์", ">", "ꦮ", "ય", "☀", "😜", "ऑ", "Þ", "હ", "ם", "雲", "𝐬", "﴾", "😠", "‧", "む", "選", "痛", "苗", "茶", "迷", "抑", "聲", "遊", "べ", "還", "勇", "楚", "怪", "刊", "爆", "谱", "顾", "辅", "卸", "氧", "扫", "ಥ", "烏", "ʊ", "ż", "₂", "ա", "‰", "✍", "庭", "秋", "﴿", "┅", "铁", "迪", "興", "ַ", "洪", "困", "肉", "桃", "ぎ", "簡", "給", "產", "導", "吴", "詩", "秘", "劃", "終", "ಖ", "厂", "苹", "丢", "Ợ", "紅", "แ", "〖", "🙄", "ř", "Ω", "籍", "㎡", "ź", "荣", "𝗺", "𝙝", "𝐜", "ঝ", "買", "ִ", "衛", "袋", "奥", "ਏ", "农", "抗", "宋", "刺", "變", "帶", "殊", "從", "唐", "巧", "熟", "偏", "歐", "懂", "覆", "ബ", "鱼", "轻", "丰", "毕", "龄", "訳", "⭐", "ศ", "💋", "ម", "ד", "δ", "ऍ", "ఒ", "莎", "ְ", "遠", "繁", "盛", "∂", "蛋", "氢", "症", "捐", "ȋ", "竹", "細", "轉", "強", "阮", "犯", "婆", "樹", "杜", "讀", "衡", "忽", "忘", "妹", "兵", "灯", "猪", "讨", "挂", "愿", "拖", "缀", "绿", "〗", "👩", "ˌ", "氏", "ۇ", "ʒ", "५", "县", "ဥ", "𝘁", "Ţ", "ケ", "𝗔", "၂", "၁", "庫", "仁", "協", "ਟ", "ਧ", "危", "借", "耳", "船", "炎", "錄", "蘇", "獨", "猶", "逆", "積", "弱", "戦", "鹿", "恋", "農", "盒", "辨", "魯", "捷", "唱", "ḻ", "ܺ", "ァ", "纹", "碎", "筛", "芬", "ଫ", "斜", "⚡", "Я", "ғ", "ગ", "✨", "३"], "labels": ["vie_Latn", "ind_Latn", "zsm_Latn", "fil_Latn", "uzn_Latn", "jav_Latn", "ceb_Latn", "bew_Latn", "sun_Latn", "hin_Latn", "mww_Latn", "mri_Latn", "haw_Latn", "hif_Latn", "smo_Latn", "lus_Latn", "nrm_Latn", "cnh_Latn", "urd_Latn", "tel_Latn", "uig_Latn", "tet_Latn", "ben_Latn", "hil_Latn", "rhg_Latn", "ctd_Latn", "kha_Latn", "ilo_Latn", "fij_Latn", "iba_Latn", "ban_Latn", "cfm_Latn", "tam_Latn", "bcl_Latn", "pan_Latn", "kac_Latn", "bbc_Latn", "nan_Latn", "tcz_Latn", "pck_Latn", "mal_Latn", "san_Latn", "gom_Latn", "ium_Latn", "pam_Latn", "mni_Latn", "meu_Latn", "ton_Latn", "mps_Latn", "war_Latn", "bis_Latn", "ory_Latn", "pon_Latn", "bjn_Latn", "bru_Latn", "hmr_Latn", "szy_Latn", "kaa_Latn", "npi_Latn", "kos_Latn", "bgp_Latn", "ape_Latn", "mar_Latn", "dtp_Latn", "jpn_Latn", "kan_Latn", "hmo_Latn", "ace_Latn", "tuc_Latn", "btx_Latn", "krj_Latn", "gil_Latn", "hak_Latn", "mjw_Latn", "tpi_Latn", "ppk_Latn", "pau_Latn", "ami_Latn", "hnj_Latn", "mah_Latn", "trv_Latn", "cmn_Latn", "pag_Latn", "raw_Latn", "jra_Latn", "asm_Latn", "njo_Latn", "rar_Latn", "meo_Latn", "chk_Latn", "cha_Latn", "guj_Latn", "mak_Latn", "cbk_Latn", "min_Latn", "tah_Latn", "zom_Latn", "hui_Latn", "rug_Latn", "tsg_Latn", "bts_Latn", "nia_Latn", "mad_Latn", "zha_Latn", "mui_Latn", "yap_Latn", "zyb_Latn", "kpg_Latn", "vap_Latn", "tay_Latn", "eng_Latn"]}README.mdAdded+197
config.jsonAdded+40
dew/__init__.pyAdded+23
dew/configuration_dew.pyAdded+144
dew/export.pyAdded+87
dew/modeling_dew.pyAdded+555
dew/ops.pyAdded+121
dew/presets.pyAdded+62
eval.jsonAdded+346
model.safetensorsAdded+3
probes.csvAdded+98
vocab.jsonAdded+1