Portuguese
mamba
mamba-3
ssm
muon
muonclip
qk-clip
adamw
optimizer
nope
hybrid-architecture
activation-checkpointing
3d-vision-language
depth-perception
point-cloud
diffusion
stable-diffusion
mixture-of-experts
kohonen
som-attention
random-forest
deep-neural-network
knowledge-distillation
bidirectional-distillation
engram-memory
multimodal
multi-token-prediction
dpo
rlhf
hh-rlhf
pcgrad
long-context
lra-qvit
engineer-agent
integral-state
cython
jev-classifiers
gumbel-softmax
quantization
riemannian-optimization
stiefel-manifold
cython-kernels
gradient-accumulation
vector-quantization
grayscale-detection
joint-perception
self-regulation
signal-table
abmo
ciar
growing-som
pt-br
KHTST v22 — fechamento 18/18 da tabela v17: os 10 produtores restantes com MEDIÇÕES REAIS (estado do otimizador via acumuladores opt-in bit-a-bit Teo 34.1; razao_update_grad com cota de Jensen Teo 34.2; razao_momentum_grad com correção estacionária sqrt(1-b^2) Teo 34.3; deriva do 2º momento calibrada pivotal Teo 34.4; RMS mecanismos Teo 34.5; folga ABMO cap/lr Teo 34.6; aceitação CIAR Teo 34.7; contadores reais de crescimento GG/GCS/GSOM Teo 34.8; tau_qk fresco Teo 34.9); APLIERS novos com nascimento neutro por base capturada (margem ABMO, kappa_ext, lambda_insercao/util_poda com poda invertida, peso_som) Teo 34.10; ciclo no mixin treinador_v22.py (Teo 34.11, limite <80KB v18 restaurado); corpus real fresco 1015 registros (7 fontes) + tokenizador 16384; A/B pareado 48 passos: 10/10 controladores novos movem, appliers escrevem nos alvos reais; doc 34 + PLANO/RELATORIO/README; suíte v22 46/46, regressão v1-v21 zero, verificar_tudo 49✓
df03b79 verified Download scripts/_merge_corpus_v22.py from PowerMachine/khtst-multimodal-ptbr: direct link, hf CLI and curl.
- Browser
- Download file 1.52 kB
-
https://huggingface.co/PowerMachine/khtst-multimodal-ptbr/resolve/main/scripts/_merge_corpus_v22.py
- Command line
-
hf download hf://PowerMachine/khtst-multimodal-ptbr/scripts/_merge_corpus_v22.py
-
curl -L -o _merge_corpus_v22.py https://huggingface.co/PowerMachine/khtst-multimodal-ptbr/resolve/main/scripts/_merge_corpus_v22.py
1.52 kB
| # -*- coding: utf-8 -*- | |
| """Merge deduplicado das fontes parciais → cache_dados/corpus_v16.jsonl | |
| (regra do projeto: dedup global por hash do texto; ordem determinística).""" | |
| import hashlib | |
| import json | |
| import os | |
| import sys | |
| RAIZ = "/home/z/my-project/khtst" | |
| DIR_P = os.path.join(RAIZ, "cache_dados", "_parcial") | |
| SAIDA = os.path.join(RAIZ, "cache_dados", "corpus_v16.jsonl") | |
| def _hash_texto(t: str) -> str: | |
| return hashlib.sha256((t or "").encode("utf-8")).hexdigest() | |
| def main() -> None: | |
| vistos, regs = set(), [] | |
| for nome in sorted(os.listdir(DIR_P)): | |
| if not nome.endswith(".jsonl"): | |
| continue | |
| with open(os.path.join(DIR_P, nome), encoding="utf-8") as f: | |
| for linha in f: | |
| try: | |
| r = json.loads(linha) | |
| except Exception: | |
| continue | |
| chave = _hash_texto(r.get("texto") or | |
| ((r.get("entrada") or "") + "␟" + | |
| (r.get("saida") or ""))) | |
| if chave and chave not in vistos: | |
| vistos.add(chave) | |
| regs.append(r) | |
| with open(SAIDA, "w", encoding="utf-8") as f: | |
| for r in regs: | |
| f.write(json.dumps(r, ensure_ascii=False) + "\n") | |
| tarefas = {} | |
| for r in regs: | |
| tarefas[r.get("tarefa")] = tarefas.get(r.get("tarefa"), 0) + 1 | |
| print(f"corpus final: {len(regs)} registros; por tarefa: {tarefas}") | |
| if __name__ == "__main__": | |
| main() | |