Commit ·
127af50
0
Parent(s):
Squash history to single initial commit
Browse files- .gitattributes +35 -0
- chat_template.jinja +4 -0
- config.json +43 -0
- configuration_ember.py +21 -0
- generation_config.json +10 -0
- model.safetensors +3 -0
- modeling_ember.py +418 -0
- tokenizer.json +0 -0
- tokenizer_config.json +85 -0
- train_logs.json +0 -0
.gitattributes
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
*.7z filter=lfs diff=lfs merge=lfs -text
|
| 2 |
+
*.arrow filter=lfs diff=lfs merge=lfs -text
|
| 3 |
+
*.bin filter=lfs diff=lfs merge=lfs -text
|
| 4 |
+
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
| 5 |
+
*.ckpt filter=lfs diff=lfs merge=lfs -text
|
| 6 |
+
*.ftz filter=lfs diff=lfs merge=lfs -text
|
| 7 |
+
*.gz filter=lfs diff=lfs merge=lfs -text
|
| 8 |
+
*.h5 filter=lfs diff=lfs merge=lfs -text
|
| 9 |
+
*.joblib filter=lfs diff=lfs merge=lfs -text
|
| 10 |
+
*.lfs.* filter=lfs diff=lfs merge=lfs -text
|
| 11 |
+
*.mlmodel filter=lfs diff=lfs merge=lfs -text
|
| 12 |
+
*.model filter=lfs diff=lfs merge=lfs -text
|
| 13 |
+
*.msgpack filter=lfs diff=lfs merge=lfs -text
|
| 14 |
+
*.npy filter=lfs diff=lfs merge=lfs -text
|
| 15 |
+
*.npz filter=lfs diff=lfs merge=lfs -text
|
| 16 |
+
*.onnx filter=lfs diff=lfs merge=lfs -text
|
| 17 |
+
*.ot filter=lfs diff=lfs merge=lfs -text
|
| 18 |
+
*.parquet filter=lfs diff=lfs merge=lfs -text
|
| 19 |
+
*.pb filter=lfs diff=lfs merge=lfs -text
|
| 20 |
+
*.pickle filter=lfs diff=lfs merge=lfs -text
|
| 21 |
+
*.pkl filter=lfs diff=lfs merge=lfs -text
|
| 22 |
+
*.pt filter=lfs diff=lfs merge=lfs -text
|
| 23 |
+
*.pth filter=lfs diff=lfs merge=lfs -text
|
| 24 |
+
*.rar filter=lfs diff=lfs merge=lfs -text
|
| 25 |
+
*.safetensors filter=lfs diff=lfs merge=lfs -text
|
| 26 |
+
saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
| 27 |
+
*.tar.* filter=lfs diff=lfs merge=lfs -text
|
| 28 |
+
*.tar filter=lfs diff=lfs merge=lfs -text
|
| 29 |
+
*.tflite filter=lfs diff=lfs merge=lfs -text
|
| 30 |
+
*.tgz filter=lfs diff=lfs merge=lfs -text
|
| 31 |
+
*.wasm filter=lfs diff=lfs merge=lfs -text
|
| 32 |
+
*.xz filter=lfs diff=lfs merge=lfs -text
|
| 33 |
+
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
+
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
+
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
chat_template.jinja
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{{ bos_token }}{% for message in messages %}{{ '<|im_start|>' + message['role'] + '
|
| 2 |
+
' + message['content'] + '<|im_end|>
|
| 3 |
+
' }}{% endfor %}{% if add_generation_prompt %}{{ '<|im_start|>assistant
|
| 4 |
+
' }}{% endif %}
|
config.json
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"architectures": [
|
| 3 |
+
"EmberForCausalLM"
|
| 4 |
+
],
|
| 5 |
+
"attention_bias": false,
|
| 6 |
+
"attention_dropout": 0.0,
|
| 7 |
+
"auto_map": {
|
| 8 |
+
"AutoConfig": "configuration_ember.EmberConfig",
|
| 9 |
+
"AutoModelForCausalLM": "modeling_ember.EmberForCausalLM"
|
| 10 |
+
},
|
| 11 |
+
"bos_token_id": 0,
|
| 12 |
+
"coda_layers": 4,
|
| 13 |
+
"dtype": "float32",
|
| 14 |
+
"eos_token_id": 2,
|
| 15 |
+
"gradient_checkpointing": false,
|
| 16 |
+
"head_dim": 32,
|
| 17 |
+
"hidden_act": "silu",
|
| 18 |
+
"hidden_size": 160,
|
| 19 |
+
"initializer_range": 0.02,
|
| 20 |
+
"intermediate_size": 448,
|
| 21 |
+
"max_position_embeddings": 2048,
|
| 22 |
+
"mlp_bias": false,
|
| 23 |
+
"model_type": "ember",
|
| 24 |
+
"num_attention_heads": 5,
|
| 25 |
+
"num_hidden_layers": 8,
|
| 26 |
+
"num_key_value_heads": 1,
|
| 27 |
+
"pad_token_id": 1,
|
| 28 |
+
"prelude_layers": 1,
|
| 29 |
+
"pretraining_tp": 1,
|
| 30 |
+
"recurrent_layers": 3,
|
| 31 |
+
"rms_norm_eps": 1e-05,
|
| 32 |
+
"rope_parameters": {
|
| 33 |
+
"rope_theta": 10000.0,
|
| 34 |
+
"rope_type": "default"
|
| 35 |
+
},
|
| 36 |
+
"rope_theta": 10000.0,
|
| 37 |
+
"tie_word_embeddings": true,
|
| 38 |
+
"transformers_version": "5.15.1",
|
| 39 |
+
"use_cache": false,
|
| 40 |
+
"use_flash_attn": false,
|
| 41 |
+
"vocab_size": 4096,
|
| 42 |
+
"xsa_projection": true
|
| 43 |
+
}
|
configuration_ember.py
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
from transformers import LlamaConfig
|
| 3 |
+
|
| 4 |
+
class EmberConfig(LlamaConfig):
|
| 5 |
+
model_type = "ember"
|
| 6 |
+
def __init__(self, *args, xsa_projection=True, rope_theta=10000.0, attention_bias=False,
|
| 7 |
+
prelude_layers=1, recurrent_layers=3, coda_layers=4,
|
| 8 |
+
gradient_checkpointing=True, use_flash_attn=True, **kwargs):
|
| 9 |
+
kwargs["num_hidden_layers"] = prelude_layers + recurrent_layers + coda_layers
|
| 10 |
+
kwargs.setdefault("use_cache", False)
|
| 11 |
+
super().__init__(*args, rope_theta=rope_theta, attention_bias=attention_bias, **kwargs)
|
| 12 |
+
self.xsa_projection = xsa_projection
|
| 13 |
+
self.rope_theta = rope_theta
|
| 14 |
+
self.attention_bias = attention_bias
|
| 15 |
+
self.prelude_layers = prelude_layers
|
| 16 |
+
self.recurrent_layers = recurrent_layers
|
| 17 |
+
self.coda_layers = coda_layers
|
| 18 |
+
self.gradient_checkpointing = gradient_checkpointing
|
| 19 |
+
self.use_flash_attn = use_flash_attn
|
| 20 |
+
if not hasattr(self, 'rope_parameters') or self.rope_parameters is None:
|
| 21 |
+
self.rope_parameters = {"rope_type": "default", "factor": 1.0, "rope_theta": rope_theta}
|
generation_config.json
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_from_model_config": true,
|
| 3 |
+
"bos_token_id": 0,
|
| 4 |
+
"eos_token_id": 2,
|
| 5 |
+
"output_attentions": false,
|
| 6 |
+
"output_hidden_states": false,
|
| 7 |
+
"pad_token_id": 1,
|
| 8 |
+
"transformers_version": "5.15.1",
|
| 9 |
+
"use_cache": false
|
| 10 |
+
}
|
model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:81cb10c1e7af1fe460af6c61f3726b5cb500fc7699e5c75eaa37cece6852f4b4
|
| 3 |
+
size 11491296
|
modeling_ember.py
ADDED
|
@@ -0,0 +1,418 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
import torch
|
| 3 |
+
import torch.nn as nn
|
| 4 |
+
import torch.nn.functional as F
|
| 5 |
+
import torch.utils.checkpoint
|
| 6 |
+
from transformers import LlamaConfig, LlamaModel, LlamaForCausalLM
|
| 7 |
+
from transformers.models.llama.modeling_llama import LlamaRMSNorm
|
| 8 |
+
from transformers.models.llama.modeling_llama import LlamaMLP
|
| 9 |
+
from transformers.modeling_outputs import BaseModelOutputWithPast, CausalLMOutputWithPast
|
| 10 |
+
from transformers.models.llama.modeling_llama import LlamaRotaryEmbedding, apply_rotary_pos_emb
|
| 11 |
+
from transformers.cache_utils import DynamicCache
|
| 12 |
+
|
| 13 |
+
try:
|
| 14 |
+
from .configuration_ember import EmberConfig
|
| 15 |
+
except ImportError:
|
| 16 |
+
from configuration_ember import EmberConfig
|
| 17 |
+
|
| 18 |
+
try:
|
| 19 |
+
from flash_attn import flash_attn_varlen_func
|
| 20 |
+
FLASH_ATTN_AVAILABLE = True
|
| 21 |
+
except ImportError:
|
| 22 |
+
FLASH_ATTN_AVAILABLE = False
|
| 23 |
+
|
| 24 |
+
@torch._dynamo.disable()
|
| 25 |
+
def _flash_varlen(q, k, v, cu_seqlens, max_seqlen, dropout_p):
|
| 26 |
+
ms = int(max_seqlen.item()) if torch.is_tensor(max_seqlen) else int(max_seqlen)
|
| 27 |
+
return flash_attn_varlen_func(
|
| 28 |
+
q, k, v, cu_seqlens, cu_seqlens, ms, ms,
|
| 29 |
+
dropout_p=dropout_p, causal=True,
|
| 30 |
+
)
|
| 31 |
+
|
| 32 |
+
class ClampedLlamaMLP(LlamaMLP):
|
| 33 |
+
def forward(self, x):
|
| 34 |
+
gate = F.silu(self.gate_proj(x).clamp(-15.0, 15.0))
|
| 35 |
+
up = self.up_proj(x)
|
| 36 |
+
return self.down_proj(gate * up)
|
| 37 |
+
|
| 38 |
+
class XSAAttention(nn.Module):
|
| 39 |
+
def __init__(self, config, layer_idx=None):
|
| 40 |
+
super().__init__()
|
| 41 |
+
self.config = config
|
| 42 |
+
self.layer_idx = layer_idx
|
| 43 |
+
self.recurrent_cache_idx = None
|
| 44 |
+
self._use_recurrent_slot = False
|
| 45 |
+
self.hidden_size = config.hidden_size
|
| 46 |
+
self.num_heads = config.num_attention_heads
|
| 47 |
+
self.num_key_value_heads = config.num_key_value_heads
|
| 48 |
+
self.num_key_value_groups = self.num_heads // self.num_key_value_heads
|
| 49 |
+
self.head_dim = getattr(config, "head_dim", self.hidden_size // self.num_heads)
|
| 50 |
+
self.attention_bias = getattr(config, "attention_bias", False)
|
| 51 |
+
|
| 52 |
+
self.q_proj = nn.Linear(self.hidden_size, self.num_heads * self.head_dim, bias=self.attention_bias)
|
| 53 |
+
self.k_proj = nn.Linear(self.hidden_size, self.num_key_value_heads * self.head_dim, bias=self.attention_bias)
|
| 54 |
+
self.v_proj = nn.Linear(self.hidden_size, self.num_key_value_heads * self.head_dim, bias=self.attention_bias)
|
| 55 |
+
self.o_proj = nn.Linear(self.num_heads * self.head_dim, self.hidden_size, bias=self.attention_bias)
|
| 56 |
+
|
| 57 |
+
self.q_norm = LlamaRMSNorm(self.head_dim, eps=1e-6)
|
| 58 |
+
self.k_norm = LlamaRMSNorm(self.head_dim, eps=1e-6)
|
| 59 |
+
|
| 60 |
+
def forward(self, hidden_states, attention_mask=None, position_ids=None, past_key_value=None,
|
| 61 |
+
output_attentions=False, use_cache=False, cache_position=None, position_embeddings=None,
|
| 62 |
+
expected_batch_size=None, cu_seqlens=None, max_seqlen=None, **kwargs):
|
| 63 |
+
past_kv = past_key_value if past_key_value is not None else kwargs.get("past_key_values", None)
|
| 64 |
+
|
| 65 |
+
if hidden_states.ndim == 2:
|
| 66 |
+
if expected_batch_size is None:
|
| 67 |
+
raise RuntimeError(
|
| 68 |
+
f"XSAAttention received 2D hidden_states {hidden_states.shape} "
|
| 69 |
+
f"without an expected_batch_size to safely restore the batch dim."
|
| 70 |
+
)
|
| 71 |
+
hidden_states = hidden_states.reshape(expected_batch_size, -1, self.hidden_size)
|
| 72 |
+
|
| 73 |
+
bsz, q_len, _ = hidden_states.size()
|
| 74 |
+
|
| 75 |
+
if expected_batch_size is not None and bsz != expected_batch_size:
|
| 76 |
+
raise RuntimeError(
|
| 77 |
+
f"XSAAttention: hidden_states batch size {bsz} does not match "
|
| 78 |
+
f"expected_batch_size {expected_batch_size}."
|
| 79 |
+
)
|
| 80 |
+
|
| 81 |
+
query_states = self.q_proj(hidden_states).view(bsz, q_len, self.num_heads, self.head_dim)
|
| 82 |
+
key_states = self.k_proj(hidden_states).view(bsz, q_len, self.num_key_value_heads, self.head_dim)
|
| 83 |
+
value_states = self.v_proj(hidden_states).view(bsz, q_len, self.num_key_value_heads, self.head_dim)
|
| 84 |
+
|
| 85 |
+
query_states = self.q_norm(query_states)
|
| 86 |
+
key_states = self.k_norm(key_states)
|
| 87 |
+
|
| 88 |
+
cos, sin = position_embeddings
|
| 89 |
+
|
| 90 |
+
use_flash = (
|
| 91 |
+
cu_seqlens is not None
|
| 92 |
+
and past_kv is None
|
| 93 |
+
and getattr(self.config, "use_flash_attn", False)
|
| 94 |
+
and FLASH_ATTN_AVAILABLE
|
| 95 |
+
)
|
| 96 |
+
|
| 97 |
+
if use_flash:
|
| 98 |
+
total = bsz * q_len
|
| 99 |
+
q = query_states.reshape(total, self.num_heads, self.head_dim)
|
| 100 |
+
k = key_states.reshape(total, self.num_key_value_heads, self.head_dim)
|
| 101 |
+
v = value_states.reshape(total, self.num_key_value_heads, self.head_dim)
|
| 102 |
+
|
| 103 |
+
# FA2 FIX: Strictly cast to bf16 to prevent fp32 leaks from RoPE/RMSNorm
|
| 104 |
+
q = q.to(torch.bfloat16)
|
| 105 |
+
k = k.to(torch.bfloat16)
|
| 106 |
+
v = v.to(torch.bfloat16)
|
| 107 |
+
|
| 108 |
+
cos_f = cos.reshape(-1, cos.shape[-1]).to(torch.bfloat16)
|
| 109 |
+
sin_f = sin.reshape(-1, sin.shape[-1]).to(torch.bfloat16)
|
| 110 |
+
q, k = apply_rotary_pos_emb(q, k, cos_f, sin_f, unsqueeze_dim=1)
|
| 111 |
+
|
| 112 |
+
attn_output = _flash_varlen(
|
| 113 |
+
q, k, v, cu_seqlens, max_seqlen,
|
| 114 |
+
self.config.attention_dropout if self.training else 0.0,
|
| 115 |
+
)
|
| 116 |
+
|
| 117 |
+
if getattr(self.config, 'xsa_projection', True):
|
| 118 |
+
y = attn_output.view(total, self.num_key_value_heads, self.num_key_value_groups, self.head_dim)
|
| 119 |
+
v_grouped = v.unsqueeze(2)
|
| 120 |
+
dot_yv = (y * v_grouped).sum(dim=-1, keepdim=True).float()
|
| 121 |
+
dot_vv = v_grouped.pow(2).sum(dim=-1, keepdim=True).clamp_min(1e-4).float()
|
| 122 |
+
scale = (dot_yv / dot_vv).to(y.dtype)
|
| 123 |
+
attn_output = (y - scale * v_grouped).reshape(total, self.num_heads, self.head_dim)
|
| 124 |
+
|
| 125 |
+
attn_output = self.o_proj(attn_output.reshape(bsz, q_len, self.hidden_size))
|
| 126 |
+
return (attn_output, None)
|
| 127 |
+
|
| 128 |
+
query_states = query_states.transpose(1, 2)
|
| 129 |
+
key_states = key_states.transpose(1, 2)
|
| 130 |
+
value_states = value_states.transpose(1, 2)
|
| 131 |
+
|
| 132 |
+
query_states, key_states = apply_rotary_pos_emb(query_states, key_states, cos, sin)
|
| 133 |
+
|
| 134 |
+
current_v = value_states
|
| 135 |
+
|
| 136 |
+
target_idx = self.layer_idx
|
| 137 |
+
if self._use_recurrent_slot and self.recurrent_cache_idx is not None:
|
| 138 |
+
target_idx = self.recurrent_cache_idx
|
| 139 |
+
|
| 140 |
+
if past_kv is not None:
|
| 141 |
+
while len(past_kv) <= target_idx:
|
| 142 |
+
past_kv.update(
|
| 143 |
+
torch.empty(bsz, self.num_key_value_heads, 0, self.head_dim, dtype=key_states.dtype, device=key_states.device),
|
| 144 |
+
torch.empty(bsz, self.num_key_value_heads, 0, self.head_dim, dtype=value_states.dtype, device=value_states.device),
|
| 145 |
+
len(past_kv)
|
| 146 |
+
)
|
| 147 |
+
key_states, value_states = past_kv.update(key_states, value_states, target_idx)
|
| 148 |
+
|
| 149 |
+
key_states = key_states.repeat_interleave(self.num_key_value_groups, dim=1)
|
| 150 |
+
value_states = value_states.repeat_interleave(self.num_key_value_groups, dim=1)
|
| 151 |
+
|
| 152 |
+
kv_len = key_states.shape[-2]
|
| 153 |
+
|
| 154 |
+
if attention_mask is not None:
|
| 155 |
+
if attention_mask.ndim == 2:
|
| 156 |
+
if attention_mask.shape[-1] < kv_len:
|
| 157 |
+
attention_mask = F.pad(attention_mask, (0, kv_len - attention_mask.shape[-1]), value=1)
|
| 158 |
+
elif attention_mask.shape[-1] > kv_len:
|
| 159 |
+
attention_mask = attention_mask[:, -kv_len:]
|
| 160 |
+
|
| 161 |
+
pad_mask = (1.0 - attention_mask[:, None, None, :].to(query_states.dtype)) * torch.finfo(query_states.dtype).min
|
| 162 |
+
|
| 163 |
+
if q_len > 1:
|
| 164 |
+
if cache_position is None:
|
| 165 |
+
cache_position = torch.arange(kv_len - q_len, kv_len, device=query_states.device)
|
| 166 |
+
kv_positions = torch.arange(kv_len, device=query_states.device)
|
| 167 |
+
|
| 168 |
+
neg_inf = torch.finfo(query_states.dtype).min
|
| 169 |
+
causal_mask = torch.zeros((q_len, kv_len), dtype=query_states.dtype, device=query_states.device)
|
| 170 |
+
causal_mask = causal_mask.masked_fill(kv_positions[None, :] > cache_position[:, None], neg_inf)
|
| 171 |
+
attn_mask = causal_mask[None, None, :, :] + pad_mask
|
| 172 |
+
|
| 173 |
+
diag_idx = torch.arange(q_len, device=attn_mask.device)
|
| 174 |
+
start_idx = attn_mask.shape[-1] - q_len
|
| 175 |
+
attn_mask[:, :, diag_idx, start_idx + diag_idx] = 0.0
|
| 176 |
+
else:
|
| 177 |
+
attn_mask = pad_mask
|
| 178 |
+
else:
|
| 179 |
+
if attention_mask.shape[0] != bsz:
|
| 180 |
+
raise RuntimeError(
|
| 181 |
+
f"attention_mask batch size {attention_mask.shape[0]} does not "
|
| 182 |
+
f"match hidden_states batch size {bsz}."
|
| 183 |
+
)
|
| 184 |
+
attn_mask = attention_mask.to(dtype=query_states.dtype)
|
| 185 |
+
is_causal = False
|
| 186 |
+
else:
|
| 187 |
+
is_causal = True
|
| 188 |
+
attn_mask = None
|
| 189 |
+
|
| 190 |
+
attn_output = F.scaled_dot_product_attention(
|
| 191 |
+
query_states, key_states, value_states, attn_mask=attn_mask,
|
| 192 |
+
dropout_p=0.0 if not self.training else self.config.attention_dropout, is_causal=is_causal
|
| 193 |
+
)
|
| 194 |
+
|
| 195 |
+
if getattr(self.config, 'xsa_projection', True):
|
| 196 |
+
y = attn_output.reshape(bsz, self.num_key_value_heads, self.num_key_value_groups, q_len, self.head_dim)
|
| 197 |
+
v_grouped = current_v.unsqueeze(2)
|
| 198 |
+
dot_yv = (y * v_grouped).sum(dim=-1, keepdim=True).float()
|
| 199 |
+
dot_vv = v_grouped.pow(2).sum(dim=-1, keepdim=True).clamp_min(1e-4).float()
|
| 200 |
+
scale = (dot_yv / dot_vv).to(y.dtype)
|
| 201 |
+
attn_output = (y - scale * v_grouped).reshape(bsz, self.num_heads, q_len, self.head_dim)
|
| 202 |
+
|
| 203 |
+
attn_output = attn_output.transpose(1, 2).contiguous()
|
| 204 |
+
attn_output = attn_output.reshape(bsz, q_len, self.hidden_size)
|
| 205 |
+
attn_output = self.o_proj(attn_output)
|
| 206 |
+
|
| 207 |
+
return (attn_output, None)
|
| 208 |
+
|
| 209 |
+
@torch._dynamo.disable()
|
| 210 |
+
def _checkpointed_layer_forward(layer, hidden_states, attention_mask, position_ids,
|
| 211 |
+
cache_position, cos, sin, expected_batch_size, cu_seqlens, max_seqlen):
|
| 212 |
+
out = layer(
|
| 213 |
+
hidden_states, attention_mask=attention_mask, position_ids=position_ids,
|
| 214 |
+
past_key_value=None, use_cache=False,
|
| 215 |
+
cache_position=cache_position, position_embeddings=(cos, sin),
|
| 216 |
+
expected_batch_size=expected_batch_size,
|
| 217 |
+
cu_seqlens=cu_seqlens, max_seqlen=max_seqlen,
|
| 218 |
+
)
|
| 219 |
+
hs_out = out[0] if isinstance(out, tuple) else out
|
| 220 |
+
if hs_out.ndim != 3 or hs_out.shape[0] != expected_batch_size:
|
| 221 |
+
raise RuntimeError(
|
| 222 |
+
f"Layer output shape {tuple(hs_out.shape)} does not match expected "
|
| 223 |
+
f"batch size {expected_batch_size}."
|
| 224 |
+
)
|
| 225 |
+
return hs_out
|
| 226 |
+
|
| 227 |
+
class EmberModel(LlamaModel):
|
| 228 |
+
def __init__(self, config):
|
| 229 |
+
super().__init__(config)
|
| 230 |
+
|
| 231 |
+
assert config.prelude_layers + config.recurrent_layers + config.coda_layers == config.num_hidden_layers, \
|
| 232 |
+
"prelude_layers + recurrent_layers + coda_layers must equal num_hidden_layers"
|
| 233 |
+
|
| 234 |
+
if getattr(config, "use_flash_attn", False) and not FLASH_ATTN_AVAILABLE:
|
| 235 |
+
raise ImportError(
|
| 236 |
+
"config.use_flash_attn=True but flash_attn is not importable. "
|
| 237 |
+
"Install the FA2 wheel or set use_flash_attn=False."
|
| 238 |
+
)
|
| 239 |
+
|
| 240 |
+
p1 = config.prelude_layers
|
| 241 |
+
r1 = p1 + config.recurrent_layers
|
| 242 |
+
|
| 243 |
+
for i, layer in enumerate(self.layers):
|
| 244 |
+
layer.self_attn = XSAAttention(config, layer_idx=i)
|
| 245 |
+
layer.mlp = ClampedLlamaMLP(config)
|
| 246 |
+
|
| 247 |
+
for i, layer in enumerate(self.layers[p1:r1]):
|
| 248 |
+
layer.self_attn.recurrent_cache_idx = config.num_hidden_layers + p1 + i
|
| 249 |
+
|
| 250 |
+
self.gradient_checkpointing = getattr(config, "gradient_checkpointing", True)
|
| 251 |
+
|
| 252 |
+
def gradient_checkpointing_enable(self):
|
| 253 |
+
self.gradient_checkpointing = True
|
| 254 |
+
|
| 255 |
+
def gradient_checkpointing_disable(self):
|
| 256 |
+
self.gradient_checkpointing = False
|
| 257 |
+
|
| 258 |
+
def forward(self, input_ids=None, attention_mask=None, position_ids=None, inputs_embeds=None,
|
| 259 |
+
past_key_values=None, use_cache=None, output_attentions=False, output_hidden_states=False,
|
| 260 |
+
cache_position=None, return_dict=True, cu_seqlens=None, max_seqlen=None, **kwargs):
|
| 261 |
+
if use_cache is None:
|
| 262 |
+
use_cache = False
|
| 263 |
+
|
| 264 |
+
if inputs_embeds is None:
|
| 265 |
+
inputs_embeds = self.embed_tokens(input_ids)
|
| 266 |
+
|
| 267 |
+
bsz, seq_len = inputs_embeds.shape[0], inputs_embeds.shape[1]
|
| 268 |
+
|
| 269 |
+
if cache_position is None:
|
| 270 |
+
past_seen = past_key_values.get_seq_length() if past_key_values is not None else 0
|
| 271 |
+
cache_position = torch.arange(past_seen, past_seen + seq_len, dtype=torch.long, device=inputs_embeds.device)
|
| 272 |
+
if position_ids is None:
|
| 273 |
+
position_ids = cache_position.unsqueeze(0).expand(bsz, -1)
|
| 274 |
+
|
| 275 |
+
hidden_states = inputs_embeds
|
| 276 |
+
position_embeddings = self.rotary_emb(hidden_states, position_ids)
|
| 277 |
+
cos, sin = position_embeddings
|
| 278 |
+
|
| 279 |
+
if use_cache and past_key_values is None:
|
| 280 |
+
past_key_values = DynamicCache()
|
| 281 |
+
|
| 282 |
+
p1 = self.config.prelude_layers
|
| 283 |
+
r1 = p1 + self.config.recurrent_layers
|
| 284 |
+
c1 = r1 + self.config.coda_layers
|
| 285 |
+
|
| 286 |
+
prelude = self.layers[:p1]
|
| 287 |
+
recurrent = self.layers[p1:r1]
|
| 288 |
+
coda = self.layers[r1:c1]
|
| 289 |
+
|
| 290 |
+
use_ckpt = self.training and self.gradient_checkpointing and not use_cache
|
| 291 |
+
|
| 292 |
+
def run_layer(layer, hs):
|
| 293 |
+
if cu_seqlens is not None:
|
| 294 |
+
torch._dynamo.mark_dynamic(cu_seqlens, 0)
|
| 295 |
+
|
| 296 |
+
out = layer(
|
| 297 |
+
hs, attention_mask=attention_mask, position_ids=position_ids,
|
| 298 |
+
past_key_value=past_key_values if use_cache else None, use_cache=use_cache,
|
| 299 |
+
cache_position=cache_position, position_embeddings=position_embeddings,
|
| 300 |
+
expected_batch_size=bsz, cu_seqlens=cu_seqlens, max_seqlen=max_seqlen,
|
| 301 |
+
)
|
| 302 |
+
hs_out = out[0] if isinstance(out, tuple) else out
|
| 303 |
+
if hs_out.ndim != 3 or hs_out.shape[0] != bsz:
|
| 304 |
+
raise RuntimeError(
|
| 305 |
+
f"Layer output shape {tuple(hs_out.shape)} does not match expected "
|
| 306 |
+
f"batch size {bsz}."
|
| 307 |
+
)
|
| 308 |
+
return hs_out
|
| 309 |
+
|
| 310 |
+
def run_layer_maybe_ckpt(layer, hs):
|
| 311 |
+
if use_ckpt:
|
| 312 |
+
return torch.utils.checkpoint.checkpoint(
|
| 313 |
+
_checkpointed_layer_forward,
|
| 314 |
+
layer, hs, attention_mask, position_ids, cache_position, cos, sin, bsz,
|
| 315 |
+
cu_seqlens, max_seqlen,
|
| 316 |
+
use_reentrant=False,
|
| 317 |
+
)
|
| 318 |
+
return run_layer(layer, hs)
|
| 319 |
+
|
| 320 |
+
for layer in prelude:
|
| 321 |
+
hidden_states = run_layer_maybe_ckpt(layer, hidden_states)
|
| 322 |
+
|
| 323 |
+
if self.training:
|
| 324 |
+
hidden_states = hidden_states + torch.randn_like(hidden_states) * 0.02
|
| 325 |
+
|
| 326 |
+
for layer in recurrent:
|
| 327 |
+
hidden_states = run_layer_maybe_ckpt(layer, hidden_states)
|
| 328 |
+
|
| 329 |
+
if self.training:
|
| 330 |
+
hidden_states = hidden_states + torch.randn_like(hidden_states) * 0.02
|
| 331 |
+
|
| 332 |
+
for layer in recurrent:
|
| 333 |
+
layer.self_attn._use_recurrent_slot = True
|
| 334 |
+
try:
|
| 335 |
+
hidden_states = run_layer_maybe_ckpt(layer, hidden_states)
|
| 336 |
+
finally:
|
| 337 |
+
layer.self_attn._use_recurrent_slot = False
|
| 338 |
+
|
| 339 |
+
for layer in coda:
|
| 340 |
+
hidden_states = run_layer_maybe_ckpt(layer, hidden_states)
|
| 341 |
+
|
| 342 |
+
hidden_states = self.norm(hidden_states)
|
| 343 |
+
return BaseModelOutputWithPast(last_hidden_state=hidden_states, past_key_values=past_key_values)
|
| 344 |
+
|
| 345 |
+
class EmberForCausalLM(LlamaForCausalLM):
|
| 346 |
+
config_class = EmberConfig
|
| 347 |
+
def __init__(self, config):
|
| 348 |
+
super(LlamaForCausalLM, self).__init__(config)
|
| 349 |
+
self.model = EmberModel(config)
|
| 350 |
+
self.vocab_size = config.vocab_size
|
| 351 |
+
self.lm_head = nn.Linear(config.hidden_size, config.vocab_size, bias=False)
|
| 352 |
+
self.post_init()
|
| 353 |
+
|
| 354 |
+
def gradient_checkpointing_enable(self, **kwargs):
|
| 355 |
+
self.model.gradient_checkpointing_enable()
|
| 356 |
+
|
| 357 |
+
def gradient_checkpointing_disable(self):
|
| 358 |
+
self.model.gradient_checkpointing_disable()
|
| 359 |
+
|
| 360 |
+
def forward(self, input_ids=None, attention_mask=None, labels=None, inputs_embeds=None,
|
| 361 |
+
use_cache=None, num_logits_to_keep=0, position_ids=None, past_key_values=None,
|
| 362 |
+
cache_position=None, cu_seqlens=None, max_seqlen=None, **kwargs):
|
| 363 |
+
if use_cache is None:
|
| 364 |
+
use_cache = False if (self.training or labels is not None) else True
|
| 365 |
+
|
| 366 |
+
if num_logits_to_keep == 0 and "logits_to_keep" in kwargs:
|
| 367 |
+
num_logits_to_keep = kwargs["logits_to_keep"]
|
| 368 |
+
|
| 369 |
+
outputs = self.model(
|
| 370 |
+
input_ids=input_ids,
|
| 371 |
+
attention_mask=attention_mask,
|
| 372 |
+
position_ids=position_ids,
|
| 373 |
+
inputs_embeds=inputs_embeds,
|
| 374 |
+
past_key_values=past_key_values,
|
| 375 |
+
use_cache=use_cache,
|
| 376 |
+
cache_position=cache_position,
|
| 377 |
+
cu_seqlens=cu_seqlens,
|
| 378 |
+
max_seqlen=max_seqlen,
|
| 379 |
+
)
|
| 380 |
+
hidden_states = outputs[0]
|
| 381 |
+
|
| 382 |
+
expected_bsz = input_ids.shape[0] if input_ids is not None else inputs_embeds.shape[0]
|
| 383 |
+
if hidden_states.ndim != 3 or hidden_states.shape[0] != expected_bsz:
|
| 384 |
+
raise RuntimeError(
|
| 385 |
+
f"EmberModel returned hidden_states with shape {tuple(hidden_states.shape)}, "
|
| 386 |
+
f"expected batch size {expected_bsz}."
|
| 387 |
+
)
|
| 388 |
+
|
| 389 |
+
loss = None
|
| 390 |
+
logits = None
|
| 391 |
+
|
| 392 |
+
if labels is not None:
|
| 393 |
+
shift_hidden = hidden_states[..., :-1, :].contiguous()
|
| 394 |
+
shift_labels = labels[..., 1:].contiguous()
|
| 395 |
+
|
| 396 |
+
num_chunks = 8
|
| 397 |
+
h_chunks = shift_hidden.chunk(num_chunks, dim=0)
|
| 398 |
+
l_chunks = shift_labels.chunk(num_chunks, dim=0)
|
| 399 |
+
|
| 400 |
+
total_loss = hidden_states.new_zeros((), dtype=torch.float32)
|
| 401 |
+
total_tokens = 0
|
| 402 |
+
for h_c, l_c in zip(h_chunks, l_chunks):
|
| 403 |
+
logits_c = self.lm_head(h_c)
|
| 404 |
+
chunk_loss = F.cross_entropy(
|
| 405 |
+
logits_c.view(-1, logits_c.size(-1)).float(),
|
| 406 |
+
l_c.view(-1),
|
| 407 |
+
reduction="sum",
|
| 408 |
+
)
|
| 409 |
+
total_loss = total_loss + chunk_loss
|
| 410 |
+
total_tokens += l_c.numel()
|
| 411 |
+
loss = (total_loss / total_tokens).to(hidden_states.dtype)
|
| 412 |
+
else:
|
| 413 |
+
slice_hidden = hidden_states if num_logits_to_keep == 0 else hidden_states[:, -num_logits_to_keep:, :]
|
| 414 |
+
logits = self.lm_head(slice_hidden)
|
| 415 |
+
|
| 416 |
+
return CausalLMOutputWithPast(
|
| 417 |
+
loss=loss, logits=logits, past_key_values=outputs.past_key_values
|
| 418 |
+
)
|
tokenizer.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
tokenizer_config.json
ADDED
|
@@ -0,0 +1,85 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"backend": "tokenizers",
|
| 3 |
+
"bos_token": "<|bos|>",
|
| 4 |
+
"clean_up_tokenization_spaces": false,
|
| 5 |
+
"eos_token": "<|eos|>",
|
| 6 |
+
"extra_special_tokens": [
|
| 7 |
+
"<|unk|>",
|
| 8 |
+
"<|pad|>",
|
| 9 |
+
"<|bos|>",
|
| 10 |
+
"<|eos|>",
|
| 11 |
+
"<|mask|>",
|
| 12 |
+
"<|im_start|>",
|
| 13 |
+
"<|im_end|>",
|
| 14 |
+
"<|system|>",
|
| 15 |
+
"<|user|>",
|
| 16 |
+
"<|assistant|>",
|
| 17 |
+
"<think>",
|
| 18 |
+
"</think>",
|
| 19 |
+
"<|begin_of_thought|>",
|
| 20 |
+
"<|end_of_thought|>",
|
| 21 |
+
"<answer>",
|
| 22 |
+
"</answer>",
|
| 23 |
+
"<|step|>",
|
| 24 |
+
"<|/step|>",
|
| 25 |
+
"<context>",
|
| 26 |
+
"</context>",
|
| 27 |
+
"<|doc_start|>",
|
| 28 |
+
"<|doc_end|>",
|
| 29 |
+
"<|search|>",
|
| 30 |
+
"<|search_results|>",
|
| 31 |
+
"<|tool_list_start|>",
|
| 32 |
+
"<|tool_list_end|>",
|
| 33 |
+
"<tools>",
|
| 34 |
+
"</tools>",
|
| 35 |
+
"<|tool_call_start|>",
|
| 36 |
+
"<|tool_call_end|>",
|
| 37 |
+
"<|tool_call|>",
|
| 38 |
+
"<|/tool_call|>",
|
| 39 |
+
"<|tool_response_start|>",
|
| 40 |
+
"<|tool_response_end|>",
|
| 41 |
+
"<|tool_response|>",
|
| 42 |
+
"<|/tool_response|>",
|
| 43 |
+
"<|image|>",
|
| 44 |
+
"<|image_pad|>",
|
| 45 |
+
"<|image_placeholder|>",
|
| 46 |
+
"<|audio|>",
|
| 47 |
+
"<|audio_pad|>",
|
| 48 |
+
"<|audio_placeholder|>",
|
| 49 |
+
"<|video|>",
|
| 50 |
+
"<|video_pad|>",
|
| 51 |
+
"<|fim_prefix|>",
|
| 52 |
+
"<|fim_suffix|>",
|
| 53 |
+
"<|fim_middle|>",
|
| 54 |
+
"<|repo_name|>",
|
| 55 |
+
"<|file_separator|>",
|
| 56 |
+
"<|reward|>",
|
| 57 |
+
"<|reserved_0|>",
|
| 58 |
+
"<|reserved_1|>",
|
| 59 |
+
"<|reserved_2|>",
|
| 60 |
+
"<|reserved_3|>",
|
| 61 |
+
"<|reserved_4|>",
|
| 62 |
+
"<|reserved_5|>",
|
| 63 |
+
"<|reserved_6|>",
|
| 64 |
+
"<|reserved_7|>",
|
| 65 |
+
"<|reserved_8|>",
|
| 66 |
+
"<|reserved_9|>",
|
| 67 |
+
"<|reserved_10|>",
|
| 68 |
+
"<|reserved_11|>",
|
| 69 |
+
"<|reserved_12|>",
|
| 70 |
+
"<|reserved_13|>",
|
| 71 |
+
"<|reserved_14|>",
|
| 72 |
+
"<|reserved_15|>",
|
| 73 |
+
"<|reserved_16|>",
|
| 74 |
+
"<|reserved_17|>",
|
| 75 |
+
"<|reserved_18|>",
|
| 76 |
+
"<|reserved_19|>"
|
| 77 |
+
],
|
| 78 |
+
"is_local": false,
|
| 79 |
+
"local_files_only": false,
|
| 80 |
+
"mask_token": "<|mask|>",
|
| 81 |
+
"model_max_length": 10000000,
|
| 82 |
+
"pad_token": "<|pad|>",
|
| 83 |
+
"tokenizer_class": "TokenizersBackend",
|
| 84 |
+
"unk_token": "<|unk|>"
|
| 85 |
+
}
|
train_logs.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|