PowerMachine commited on
Commit
26c2d0b
·
verified ·
1 Parent(s): 364c6c2

V6.5-V2-dynamic: upload batch (scripts + state + model) [79 files]

Browse files
scripts/train_v6_5_v2.py CHANGED
@@ -2446,8 +2446,13 @@ def upload_to_hf_batch(
2446
  if not src.exists():
2447
  logger.warning(f"[V6.5-V2] Skipping non-existent file: {src}")
2448
  continue
2449
- # Caminho no repo: mantém apenas o nome do arquivo (sem dirs locais)
2450
- path_in_repo = src.name
 
 
 
 
 
2451
  upload_plan.append({
2452
  "local": str(src),
2453
  "path_in_repo": path_in_repo,
@@ -2892,43 +2897,68 @@ def main() -> int:
2892
  if hf_token:
2893
  logger.info("\n[V6.5-V2] Coletando arquivos para upload HF em LOTE...")
2894
 
2895
- # Scripts a enviar (sobrescrevem antigos no HF)
2896
- # V6.5-V2-metrics-FIX-2: inclui vqvae2_hierarchical_flexnet.py
2897
- # (vqvae2 reativado em FASE1 e FASE2 — módulo dependente do KLS).
2898
- scripts_to_upload: List[Path] = [
2899
- BIGRU_ROOT / "scripts" / "train_v6_5_v2.py",
2900
- SRC_ROOT / "bigru_t" / "model" / "kohonen_learning_system.py",
2901
- SRC_ROOT / "bigru_t" / "model" / "hyp_t.py",
2902
- SRC_ROOT / "bigru_t" / "model" / "som_metrics.py", # V6.5-V2-metrics
2903
- SRC_ROOT / "bigru_t" / "model" / "vqvae2_hierarchical.py",
2904
- SRC_ROOT / "bigru_t" / "model" / "vqvae2_hierarchical_flexnet.py", # V6.5-V2-metrics-FIX-2
2905
- SRC_ROOT / "bigru_t" / "model" / "attention_multimodal.py",
2906
- SRC_ROOT / "bigru_t" / "data" / "streaming_datasets.py",
2907
- SRC_ROOT / "bigru_t" / "utils" / "xeon_runtime.py",
2908
- ]
2909
- # V6.5-V2-metrics-FIX-3: FILTRA arquivos .pt do upload HF.
2910
- # User requirement: "ao concluir enviar para o HF os arquivos e módulos
2911
- # e scripts em lote" + auditoria encontrou que .pt files estavam sendo
2912
- # uploaded (MODEL_STATES_PATH e *_after_conhecimento.pt). Estados do
2913
- # modelo (>40MB cada) não devem ir ao HF — apenas scripts e relatórios.
2914
- outputs_to_upload: List[Path] = [
2915
- REPORT_PATH,
2916
- V2_PHASES_EVAL_PATH,
2917
- PREDICT_FIX_EVAL_PATH,
2918
- ATTENTION_EVAL_PATH,
2919
- USER_QUESTIONS_PATH,
2920
- ]
2921
- # Filtra os que existem E não são .pt/.pth/.bin/.safetensors
2922
  all_files: List[Path] = []
2923
- _FORBIDDEN_UPLOAD_EXTS = {'.pt', '.pth', '.bin', '.safetensors', '.ckpt'}
2924
- for p in scripts_to_upload + outputs_to_upload:
2925
- if not p.exists():
2926
- logger.warning(f"[V6.5-V2] Upload file not found: {p}")
2927
- continue
2928
- if p.suffix.lower() in _FORBIDDEN_UPLOAD_EXTS:
2929
- logger.info(f"[V6.5-V2] Skipping model state from HF upload: {p.name}")
2930
  continue
2931
- all_files.append(p)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2932
 
2933
  # Apaga HF_TOKEN dos scripts ANTES do upload (não enviar tokens)
2934
  scrub_result = scrub_hf_token_from_scripts(BIGRU_ROOT / "scripts")
@@ -2977,23 +3007,39 @@ def main() -> int:
2977
  final_storage_cleanup = aggressive_storage_cleanup()
2978
  aggressive_memory_cleanup()
2979
 
2980
- # V6.5-V2-metrics-FIX: Remove TODOS os arquivos .pt do projeto após upload
2981
- # ao HF (user requirement: "remover imediatamente todos os arquivos *.pt
2982
- # e não armazenar mais arquivos no worklog"). O estado do modelo já foi
2983
- # enviado ao HF e pode ser recuperado de lá para continuar treinamento.
2984
- logger.info("[V6.5-V2-metrics-FIX] Removendo TODOS os arquivos .pt locais...")
 
2985
  pt_files_removed: List[str] = []
2986
- for pt_file in PROJECT_ROOT.rglob("*.pt"):
2987
- try:
2988
- rel_path = str(pt_file.relative_to(PROJECT_ROOT))
2989
- pt_file.unlink()
2990
- pt_files_removed.append(rel_path)
2991
- logger.info(f" removed .pt: {rel_path}")
2992
- except Exception as e:
2993
- logger.warning(f" failed to remove {pt_file}: {e}")
2994
- logger.info(
2995
- f"[V6.5-V2-metrics-FIX] {len(pt_files_removed)} .pt files removed."
2996
- )
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2997
 
2998
  # Atualiza worklog.md (sem referenciar .pt files)
2999
  try:
 
2446
  if not src.exists():
2447
  logger.warning(f"[V6.5-V2] Skipping non-existent file: {src}")
2448
  continue
2449
+ # V6.5-V2-auto-conscience-v2 — PRESERVA estrutura de diretórios no HF.
2450
+ # path_in_repo = path relativo a BIGRU_ROOT (ex: src/bigru_t/model/kohonen_learning_system.py)
2451
+ try:
2452
+ path_in_repo = str(src.relative_to(BIGRU_ROOT)).replace("\\", "/")
2453
+ except ValueError:
2454
+ # Fallback: filename only (for files outside BIGRU_ROOT)
2455
+ path_in_repo = src.name
2456
  upload_plan.append({
2457
  "local": str(src),
2458
  "path_in_repo": path_in_repo,
 
2897
  if hf_token:
2898
  logger.info("\n[V6.5-V2] Coletando arquivos para upload HF em LOTE...")
2899
 
2900
+ # V6.5-V2-auto-conscience-v2 — Coleta TODOS os arquivos .py sob src/ e
2901
+ # scripts/ (exceto deprecados/), preservando estrutura de diretórios
2902
+ # no HF (path_in_repo = path relativo a BIGRU_ROOT).
2903
+ # User requirement (latest): "ao concluir enviar para o HF os arquivos
2904
+ # de Estado do modelo e módulos python e scripts em lote" +
2905
+ # "estado (e treinamento para permitir continuar novo treinamento)".
2906
+ #
2907
+ # Estratégia:
2908
+ # (a) Módulos .py + scripts .py sob src/ e scripts/ — preserva dirs
2909
+ # (b) Model state .pt — UPLOAD ao HF (user quer continuar treino)
2910
+ # Verifica tamanho ≤ 500MB antes de enviar (HF LFS free tier)
2911
+ # (c) Relatórios JSON — para auditoria
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2912
  all_files: List[Path] = []
2913
+ _EXCLUDE_DIRS = {"deprecados", "__pycache__", ".git", ".pytest_cache",
2914
+ "model_final", "docs", "node_modules", ".venv", "venv"}
2915
+ _INCLUDE_EXTS = {".py", ".md", ".txt", ".json", ".sh"}
2916
+ # (a) Walk src/ e scripts/ preservando paths relativos
2917
+ for root_dir in [SRC_ROOT, BIGRU_ROOT / "scripts"]:
2918
+ if not root_dir.exists():
 
2919
  continue
2920
+ for path in root_dir.rglob("*"):
2921
+ if not path.is_file():
2922
+ continue
2923
+ try:
2924
+ rel = path.relative_to(BIGRU_ROOT)
2925
+ except ValueError:
2926
+ continue
2927
+ if any(part in _EXCLUDE_DIRS for part in rel.parts):
2928
+ continue
2929
+ if path.suffix.lower() not in _INCLUDE_EXTS:
2930
+ continue
2931
+ all_files.append(path)
2932
+ # (b) Model state .pt files (estado para continuar treino)
2933
+ # User requirement: "estado (e treinamento para permitir continuar
2934
+ # novo treinamento) do modelo testados e aprovados".
2935
+ # Inclui: v6_5_v2_model_states.pt, v6_5_v2_model_states_after_conhecimento.pt
2936
+ # Verifica tamanho ≤ 500MB (HF LFS free tier sem autenticar LFS).
2937
+ _MAX_HF_LFS_SIZE_BYTES = 500 * 1024 * 1024 # 500MB
2938
+ for pt_candidate in [
2939
+ MODEL_STATES_PATH,
2940
+ BIGRU_ROOT / "v6_5_v2_model_states_after_conhecimento.pt",
2941
+ ]:
2942
+ if pt_candidate.exists():
2943
+ pt_size = pt_candidate.stat().st_size
2944
+ if pt_size <= _MAX_HF_LFS_SIZE_BYTES:
2945
+ all_files.append(pt_candidate)
2946
+ logger.info(f"[V6.5-V2] Incluindo estado do modelo no upload HF: {pt_candidate.name} ({pt_size/1e6:.1f}MB)")
2947
+ else:
2948
+ logger.warning(f"[V6.5-V2] Estado muito grande para HF LFS (>{_MAX_HF_LFS_SIZE_BYTES/1e6:.0f}MB): {pt_candidate.name} ({pt_size/1e6:.1f}MB) — será mantido localmente apenas")
2949
+ # (c) Relatórios JSON
2950
+ for rpt in [REPORT_PATH, V2_PHASES_EVAL_PATH, PREDICT_FIX_EVAL_PATH,
2951
+ ATTENTION_EVAL_PATH, USER_QUESTIONS_PATH]:
2952
+ if rpt.exists():
2953
+ all_files.append(rpt)
2954
+ # Dedup
2955
+ seen = set()
2956
+ deduped_files: List[Path] = []
2957
+ for p in all_files:
2958
+ if str(p) not in seen:
2959
+ seen.add(str(p))
2960
+ deduped_files.append(p)
2961
+ all_files = deduped_files
2962
 
2963
  # Apaga HF_TOKEN dos scripts ANTES do upload (não enviar tokens)
2964
  scrub_result = scrub_hf_token_from_scripts(BIGRU_ROOT / "scripts")
 
3007
  final_storage_cleanup = aggressive_storage_cleanup()
3008
  aggressive_memory_cleanup()
3009
 
3010
+ # V6.5-V2-auto-conscience-v2 — Limpeza de .pt files: SÓ remove se o upload
3011
+ # HF foi bem-sucedido. User requirement (latest):
3012
+ # "estado (e treinamento para permitir continuar novo treinamento)"
3013
+ # Se HF upload falhou, MANTÉM os .pt locais para o usuário poder recuperá-los.
3014
+ # Se HF upload OK, remove apenas os .pt do diretório do projeto (exceto
3015
+ # download/, que é a área de entrega para o usuário).
3016
  pt_files_removed: List[str] = []
3017
+ if hf_upload_result.get("uploaded", False):
3018
+ logger.info("[V6.5-V2-auto-conscience-v2] HF upload OK — removendo .pt locais do projeto (estado já está no HF)...")
3019
+ for pt_file in BIGRU_ROOT.rglob("*.pt"):
3020
+ try:
3021
+ rel_path = str(pt_file.relative_to(PROJECT_ROOT))
3022
+ pt_file.unlink()
3023
+ pt_files_removed.append(rel_path)
3024
+ logger.info(f" removed .pt: {rel_path}")
3025
+ except Exception as e:
3026
+ logger.warning(f" failed to remove {pt_file}: {e}")
3027
+ logger.info(
3028
+ f"[V6.5-V2-auto-conscience-v2] {len(pt_files_removed)} .pt files removed from project."
3029
+ )
3030
+ else:
3031
+ logger.warning(
3032
+ "[V6.5-V2-auto-conscience-v2] HF upload falhou — MANTENDO .pt locais "
3033
+ "para preservar estado do modelo. User pode recuperar manualmente."
3034
+ )
3035
+ # Copia .pt para download/ para que o usuário tenha acesso
3036
+ for pt_file in BIGRU_ROOT.rglob("*.pt"):
3037
+ try:
3038
+ dst = DOWNLOAD_DIR / pt_file.name
3039
+ shutil.copy2(pt_file, dst)
3040
+ logger.info(f" .pt copiado para download/: {pt_file.name}")
3041
+ except Exception as e:
3042
+ logger.warning(f" failed to copy {pt_file}: {e}")
3043
 
3044
  # Atualiza worklog.md (sem referenciar .pt files)
3045
  try:
v6_5_v2_attention_eval.json CHANGED
@@ -3,18 +3,18 @@
3
  "user_requirement": "verificar se o mecanismo de atenção está ativo e acessado logicamente funcional",
4
  "metrics": {
5
  "active": true,
6
- "n_calls": 10000,
7
  "n_errors": 0,
8
- "last_norm_in": 109.84779357910156,
9
- "last_norm_out": 114.40419006347656,
10
  "last_attn_activated": true,
11
- "last_attn_diff_norm": 114.49571990966797,
12
  "n_heads": 8,
13
  "logic_functional": true
14
  },
15
  "active": true,
16
  "logic_functional": true,
17
- "n_calls": 10000,
18
  "n_errors": 0,
19
  "n_heads": 8,
20
  "assessment": "PASS"
 
3
  "user_requirement": "verificar se o mecanismo de atenção está ativo e acessado logicamente funcional",
4
  "metrics": {
5
  "active": true,
6
+ "n_calls": 500,
7
  "n_errors": 0,
8
+ "last_norm_in": 108.67192077636719,
9
+ "last_norm_out": 112.93913269042969,
10
  "last_attn_activated": true,
11
+ "last_attn_diff_norm": 114.95559692382812,
12
  "n_heads": 8,
13
  "logic_functional": true
14
  },
15
  "active": true,
16
  "logic_functional": true,
17
+ "n_calls": 500,
18
  "n_errors": 0,
19
  "n_heads": 8,
20
  "assessment": "PASS"
v6_5_v2_model_states.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d441bc350835134d8bf3d2cba4fb0a7c4f29871779b8b414adddf65fc6b792d5
3
+ size 217669998
v6_5_v2_model_states_after_conhecimento.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d13463dc76a501f504b912149ced55883d2e3227c61d359157cb84e00fe331a2
3
+ size 217675097
v6_5_v2_phases_eval.json CHANGED
The diff for this file is too large to render. See raw diff
 
v6_5_v2_predict_fix_eval.json CHANGED
@@ -5,8 +5,8 @@
5
  "results": [
6
  {
7
  "query": "o gato dorme na cama",
8
- "prediction": "short_text",
9
- "probability": 0.443034291267395,
10
  "is_gato_hardcoded": false,
11
  "is_cachorro_hardcoded": false,
12
  "is_registry_label": true,
@@ -14,8 +14,8 @@
14
  },
15
  {
16
  "query": "calcule dois mais dois",
17
- "prediction": "short_text",
18
- "probability": 0.443034291267395,
19
  "is_gato_hardcoded": false,
20
  "is_cachorro_hardcoded": false,
21
  "is_registry_label": true,
@@ -23,8 +23,8 @@
23
  },
24
  {
25
  "query": "qual é a capital do brasil",
26
- "prediction": "short_text",
27
- "probability": 0.443034291267395,
28
  "is_gato_hardcoded": false,
29
  "is_cachorro_hardcoded": false,
30
  "is_registry_label": true,
@@ -32,8 +32,8 @@
32
  },
33
  {
34
  "query": "explique o que é uma rede neural",
35
- "prediction": "short_text",
36
- "probability": 0.443034291267395,
37
  "is_gato_hardcoded": false,
38
  "is_cachorro_hardcoded": false,
39
  "is_registry_label": true,
@@ -41,8 +41,8 @@
41
  },
42
  {
43
  "query": "olá como você está",
44
- "prediction": "short_text",
45
- "probability": 0.443034291267395,
46
  "is_gato_hardcoded": false,
47
  "is_cachorro_hardcoded": false,
48
  "is_registry_label": true,
@@ -50,8 +50,8 @@
50
  },
51
  {
52
  "query": "traduza hello para portugues",
53
- "prediction": "short_text",
54
- "probability": 0.443034291267395,
55
  "is_gato_hardcoded": false,
56
  "is_cachorro_hardcoded": false,
57
  "is_registry_label": true,
@@ -65,70 +65,7 @@
65
  "unpunctuated",
66
  "punctuated"
67
  ],
68
- "prediction": "unpunctuated",
69
- "valid_for_dataset": true
70
- },
71
- {
72
- "dataset": "carolina-c4ai/corpus-carolina",
73
- "expected_labels": [
74
- "raw_corpus",
75
- "normalized_text"
76
- ],
77
- "prediction": "raw_corpus",
78
- "valid_for_dataset": true
79
- },
80
- {
81
- "dataset": "CEIA-POSITIVO/ultrachat_br_clustred_balanced_v1",
82
- "expected_labels": [
83
- "user_turn",
84
- "assistant_turn"
85
- ],
86
- "prediction": "user_turn",
87
- "valid_for_dataset": true
88
- },
89
- {
90
- "dataset": "dominguesm/Canarim-Instruct-PTBR-Dataset",
91
- "expected_labels": [
92
- "instruction",
93
- "response"
94
- ],
95
- "prediction": "instruction",
96
- "valid_for_dataset": true
97
- },
98
- {
99
- "dataset": "adalbertojunior/punctuation-ptbr",
100
- "expected_labels": [
101
- "unpunctuated",
102
- "punctuated"
103
- ],
104
- "prediction": "unpunctuated",
105
- "valid_for_dataset": true
106
- },
107
- {
108
- "dataset": "iara-project/news-articles-ptbr-dataset",
109
- "expected_labels": [
110
- "headline",
111
- "body"
112
- ],
113
- "prediction": "headline",
114
- "valid_for_dataset": true
115
- },
116
- {
117
- "dataset": "manoela/noticias_ptbr",
118
- "expected_labels": [
119
- "headline",
120
- "body"
121
- ],
122
- "prediction": "headline",
123
- "valid_for_dataset": true
124
- },
125
- {
126
- "dataset": "BrunoN-Dev/corpus-ptbr-v1",
127
- "expected_labels": [
128
- "short_text",
129
- "long_text"
130
- ],
131
- "prediction": "short_text",
132
  "valid_for_dataset": true
133
  }
134
  ],
 
5
  "results": [
6
  {
7
  "query": "o gato dorme na cama",
8
+ "prediction": "punctuated",
9
+ "probability": 1.0,
10
  "is_gato_hardcoded": false,
11
  "is_cachorro_hardcoded": false,
12
  "is_registry_label": true,
 
14
  },
15
  {
16
  "query": "calcule dois mais dois",
17
+ "prediction": "punctuated",
18
+ "probability": 1.0,
19
  "is_gato_hardcoded": false,
20
  "is_cachorro_hardcoded": false,
21
  "is_registry_label": true,
 
23
  },
24
  {
25
  "query": "qual é a capital do brasil",
26
+ "prediction": "punctuated",
27
+ "probability": 1.0,
28
  "is_gato_hardcoded": false,
29
  "is_cachorro_hardcoded": false,
30
  "is_registry_label": true,
 
32
  },
33
  {
34
  "query": "explique o que é uma rede neural",
35
+ "prediction": "punctuated",
36
+ "probability": 1.0,
37
  "is_gato_hardcoded": false,
38
  "is_cachorro_hardcoded": false,
39
  "is_registry_label": true,
 
41
  },
42
  {
43
  "query": "olá como você está",
44
+ "prediction": "punctuated",
45
+ "probability": 1.0,
46
  "is_gato_hardcoded": false,
47
  "is_cachorro_hardcoded": false,
48
  "is_registry_label": true,
 
50
  },
51
  {
52
  "query": "traduza hello para portugues",
53
+ "prediction": "punctuated",
54
+ "probability": 1.0,
55
  "is_gato_hardcoded": false,
56
  "is_cachorro_hardcoded": false,
57
  "is_registry_label": true,
 
65
  "unpunctuated",
66
  "punctuated"
67
  ],
68
+ "prediction": "punctuated",
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
69
  "valid_for_dataset": true
70
  }
71
  ],
v6_5_v2_report.json CHANGED
@@ -1,6 +1,6 @@
1
  {
2
  "version": "V6.5-V2",
3
- "timestamp": "2026-08-09T03:12:19.635254",
4
  "config": {
5
  "som_grid": [
6
  6,
@@ -54,10 +54,10 @@
54
  "init_done": true
55
  },
56
  "fp16_benchmark": {
57
- "best_time_ms": 96.71666700160131,
58
- "avg_time_ms": 98.70659000080195,
59
- "best_tflops": 1.3234533815963772,
60
- "avg_tflops": 1.296772586298038,
61
  "matrix_size": 4000.0
62
  },
63
  "v2_verification": {
@@ -84,24 +84,24 @@
84
  "all_pass": true
85
  },
86
  "fase_1_conhecimento_summary": {
87
- "total_samples": 8000,
88
- "meta_atingida": true,
89
- "elapsed_s": 460.5420436859131,
90
- "storage_critical_stopped": false
91
  },
92
  "fase_2_punicão_summary": {
93
- "total_samples": 2000,
94
- "meta_atingida": true,
95
- "elapsed_s": 728.1188757419586,
96
- "punishment_events": 120,
97
- "hypotheses_trainings": 60,
98
- "delta_applications": 60,
99
- "skipped": false
100
  },
101
  "attention_eval_summary": {
102
  "active": true,
103
  "logic_functional": true,
104
- "n_calls": 10000,
105
  "assessment": "PASS"
106
  },
107
  "predict_fix_summary": {
@@ -117,53 +117,52 @@
117
  "n_with_think": 0,
118
  "answer_rate": 1.0,
119
  "think_rate": 0.0,
120
- "avg_latency_ms": 4.7105153401692705,
121
  "avg_reasoning_length": 69.0
122
  },
123
  "model_states_saved_to": "/home/z/my-project/BiGRU_T_version/v6_5_v2_model_states.pt",
124
  "save_info": {
125
  "saved": true,
126
  "path": "/home/z/my-project/BiGRU_T_version/v6_5_v2_model_states.pt",
127
- "size_mb": 220.15666,
128
- "size_gb": 0.20503686740994453,
129
  "size_status": "OK",
130
  "size_within_1gb_limit": true,
131
  "reason": "end_of_training_v2",
132
- "step": 700,
133
- "total_samples": 10000,
134
  "n_tensors": 7,
135
  "n_buffer_tail": 64
136
  },
137
  "final_v2_metrics": {
138
  "version": "V2-dynamic",
139
- "n_hypotheses": 4,
140
- "n_hypotheses_active": 4,
141
  "max_n_hypotheses": 32,
142
- "n_trials": 6,
143
- "hyp_train_steps": 80,
144
  "hyp_lr": 0.0001,
145
- "delta_scale": 0.0010000000474974513,
146
  "n_generators": 32,
147
  "punishment_count": 0,
148
  "success_count": 0,
149
- "training_ready": false,
150
- "classifier_trained": true,
151
- "ewc_reference_set": true,
152
  "buffer_size": 128,
153
- "total_hyp_steps_executed": 4550,
154
- "n_train_hyp_calls": 60,
155
  "dynamic_adaptation": {
156
- "loss_history_len": 8,
157
  "loss_stats": {
158
- "slope": -0.00034456806523459297,
159
- "volatility": 0.0024739346406965515,
160
- "mean": 0.6898908242583275,
161
- "std": 0.0017067448084313731,
162
- "n": 8
163
  },
164
- "punishment_rate": 1.0,
165
- "punishment_window_size": 12,
166
- "n_adaptations": 20,
167
  "limits": {
168
  "min_n_hypotheses": 4,
169
  "max_n_hypotheses": 32,
@@ -172,128 +171,7 @@
172
  "min_hyp_train_steps": 10,
173
  "max_hyp_train_steps": 80
174
  },
175
- "last_5_adaptations": [
176
- {
177
- "trigger": "punishment",
178
- "step": 115,
179
- "before": {
180
- "n_hypotheses": 4,
181
- "n_trials": 6,
182
- "hyp_train_steps": 80
183
- },
184
- "after": {
185
- "n_hypotheses": 4,
186
- "n_trials": 6,
187
- "hyp_train_steps": 80
188
- },
189
- "adapted": false,
190
- "rules_fired": [],
191
- "loss_stats": {
192
- "slope": -0.00037475568907601494,
193
- "volatility": 0.0033018073049031742,
194
- "mean": 0.6912502944469452,
195
- "std": 0.0022823752717213938,
196
- "n": 8
197
- },
198
- "punishment_rate": 1.0
199
- },
200
- {
201
- "trigger": "auto",
202
- "step": 116,
203
- "before": {
204
- "n_hypotheses": 4,
205
- "n_trials": 6,
206
- "hyp_train_steps": 80
207
- },
208
- "after": {
209
- "n_hypotheses": 4,
210
- "n_trials": 6,
211
- "hyp_train_steps": 80
212
- },
213
- "adapted": false,
214
- "rules_fired": [],
215
- "loss_stats": {
216
- "slope": -0.0005504623765037174,
217
- "volatility": 0.003395094498254662,
218
- "mean": 0.6910898759961128,
219
- "std": 0.002346315435793899,
220
- "n": 8
221
- },
222
- "punishment_rate": 1.0
223
- },
224
- {
225
- "trigger": "punishment",
226
- "step": 117,
227
- "before": {
228
- "n_hypotheses": 4,
229
- "n_trials": 6,
230
- "hyp_train_steps": 80
231
- },
232
- "after": {
233
- "n_hypotheses": 4,
234
- "n_trials": 6,
235
- "hyp_train_steps": 80
236
- },
237
- "adapted": false,
238
- "rules_fired": [],
239
- "loss_stats": {
240
- "slope": -0.0005504623765037174,
241
- "volatility": 0.003395094498254662,
242
- "mean": 0.6910898759961128,
243
- "std": 0.002346315435793899,
244
- "n": 8
245
- },
246
- "punishment_rate": 1.0
247
- },
248
- {
249
- "trigger": "auto",
250
- "step": 118,
251
- "before": {
252
- "n_hypotheses": 4,
253
- "n_trials": 6,
254
- "hyp_train_steps": 80
255
- },
256
- "after": {
257
- "n_hypotheses": 4,
258
- "n_trials": 6,
259
- "hyp_train_steps": 80
260
- },
261
- "adapted": false,
262
- "rules_fired": [],
263
- "loss_stats": {
264
- "slope": -0.00034456806523459297,
265
- "volatility": 0.0024739346406965515,
266
- "mean": 0.6898908242583275,
267
- "std": 0.0017067448084313731,
268
- "n": 8
269
- },
270
- "punishment_rate": 1.0
271
- },
272
- {
273
- "trigger": "punishment",
274
- "step": 119,
275
- "before": {
276
- "n_hypotheses": 4,
277
- "n_trials": 6,
278
- "hyp_train_steps": 80
279
- },
280
- "after": {
281
- "n_hypotheses": 4,
282
- "n_trials": 6,
283
- "hyp_train_steps": 80
284
- },
285
- "adapted": false,
286
- "rules_fired": [],
287
- "loss_stats": {
288
- "slope": -0.00034456806523459297,
289
- "volatility": 0.0024739346406965515,
290
- "mean": 0.6898908242583275,
291
- "std": 0.0017067448084313731,
292
- "n": 8
293
- },
294
- "punishment_rate": 1.0
295
- }
296
- ]
297
  }
298
  }
299
  }
 
1
  {
2
  "version": "V6.5-V2",
3
+ "timestamp": "2026-08-09T03:50:50.214658",
4
  "config": {
5
  "som_grid": [
6
  6,
 
54
  "init_done": true
55
  },
56
  "fp16_benchmark": {
57
+ "best_time_ms": 93.99212000062107,
58
+ "avg_time_ms": 98.73566050009686,
59
+ "best_tflops": 1.361816288420287,
60
+ "avg_tflops": 1.2963907807136654,
61
  "matrix_size": 4000.0
62
  },
63
  "v2_verification": {
 
84
  "all_pass": true
85
  },
86
  "fase_1_conhecimento_summary": {
87
+ "total_samples": 500,
88
+ "meta_atingida": false,
89
+ "elapsed_s": 37.09058332443237,
90
+ "storage_critical_stopped": true
91
  },
92
  "fase_2_punicão_summary": {
93
+ "total_samples": 0,
94
+ "meta_atingida": false,
95
+ "elapsed_s": 0.0,
96
+ "punishment_events": 0,
97
+ "hypotheses_trainings": 0,
98
+ "delta_applications": 0,
99
+ "skipped": true
100
  },
101
  "attention_eval_summary": {
102
  "active": true,
103
  "logic_functional": true,
104
+ "n_calls": 500,
105
  "assessment": "PASS"
106
  },
107
  "predict_fix_summary": {
 
117
  "n_with_think": 0,
118
  "answer_rate": 1.0,
119
  "think_rate": 0.0,
120
+ "avg_latency_ms": 4.463593165079753,
121
  "avg_reasoning_length": 69.0
122
  },
123
  "model_states_saved_to": "/home/z/my-project/BiGRU_T_version/v6_5_v2_model_states.pt",
124
  "save_info": {
125
  "saved": true,
126
  "path": "/home/z/my-project/BiGRU_T_version/v6_5_v2_model_states.pt",
127
+ "size_mb": 217.669998,
128
+ "size_gb": 0.20272098295390606,
129
  "size_status": "OK",
130
  "size_within_1gb_limit": true,
131
  "reason": "end_of_training_v2",
132
+ "step": 35,
133
+ "total_samples": 500,
134
  "n_tensors": 7,
135
  "n_buffer_tail": 64
136
  },
137
  "final_v2_metrics": {
138
  "version": "V2-dynamic",
139
+ "n_hypotheses": 16,
140
+ "n_hypotheses_active": 16,
141
  "max_n_hypotheses": 32,
142
+ "n_trials": 3,
143
+ "hyp_train_steps": 30,
144
  "hyp_lr": 0.0001,
145
+ "delta_scale": 0.009999999776482582,
146
  "n_generators": 32,
147
  "punishment_count": 0,
148
  "success_count": 0,
149
+ "training_ready": true,
150
+ "classifier_trained": false,
151
+ "ewc_reference_set": false,
152
  "buffer_size": 128,
153
+ "total_hyp_steps_executed": 0,
154
+ "n_train_hyp_calls": 0,
155
  "dynamic_adaptation": {
156
+ "loss_history_len": 0,
157
  "loss_stats": {
158
+ "slope": 0.0,
159
+ "volatility": 0.0,
160
+ "mean": 0.0,
161
+ "n": 0
 
162
  },
163
+ "punishment_rate": 0.0,
164
+ "punishment_window_size": 0,
165
+ "n_adaptations": 0,
166
  "limits": {
167
  "min_n_hypotheses": 4,
168
  "max_n_hypotheses": 32,
 
171
  "min_hyp_train_steps": 10,
172
  "max_hyp_train_steps": 80
173
  },
174
+ "last_5_adaptations": []
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
175
  }
176
  }
177
  }
v6_5_v2_user_questions.json CHANGED
@@ -18,17 +18,17 @@
18
  "context_provided": false,
19
  "system_prompt_used": false,
20
  "few_shot_examples": false,
21
- "som_prediction": "short_text",
22
  "reasoning_length": 69,
23
  "has_think": false,
24
  "has_plan": false,
25
  "has_answer": true,
26
  "has_decompose": false,
27
  "think_preview": "",
28
- "answer_preview": "ReasoningEngine disabled. SOM prediction: short_text",
29
- "raw_response_preview": "<answer>ReasoningEngine disabled. SOM prediction: short_text</answer>",
30
  "n_tags": 1,
31
- "latency_ms": 4.777431488037109
32
  },
33
  {
34
  "query": "Lula reserva valor",
@@ -36,17 +36,17 @@
36
  "context_provided": false,
37
  "system_prompt_used": false,
38
  "few_shot_examples": false,
39
- "som_prediction": "short_text",
40
  "reasoning_length": 69,
41
  "has_think": false,
42
  "has_plan": false,
43
  "has_answer": true,
44
  "has_decompose": false,
45
  "think_preview": "",
46
- "answer_preview": "ReasoningEngine disabled. SOM prediction: short_text",
47
- "raw_response_preview": "<answer>ReasoningEngine disabled. SOM prediction: short_text</answer>",
48
  "n_tags": 1,
49
- "latency_ms": 4.729270935058594
50
  },
51
  {
52
  "query": "Amazonas força-tarefa vítimas",
@@ -54,17 +54,17 @@
54
  "context_provided": false,
55
  "system_prompt_used": false,
56
  "few_shot_examples": false,
57
- "som_prediction": "short_text",
58
  "reasoning_length": 69,
59
  "has_think": false,
60
  "has_plan": false,
61
  "has_answer": true,
62
  "has_decompose": false,
63
  "think_preview": "",
64
- "answer_preview": "ReasoningEngine disabled. SOM prediction: short_text",
65
- "raw_response_preview": "<answer>ReasoningEngine disabled. SOM prediction: short_text</answer>",
66
  "n_tags": 1,
67
- "latency_ms": 4.624843597412109
68
  }
69
  ],
70
  "summary": {
@@ -72,7 +72,7 @@
72
  "n_with_think": 0,
73
  "answer_rate": 1.0,
74
  "think_rate": 0.0,
75
- "avg_latency_ms": 4.7105153401692705,
76
  "avg_reasoning_length": 69.0
77
  },
78
  "quality_assessment": {
 
18
  "context_provided": false,
19
  "system_prompt_used": false,
20
  "few_shot_examples": false,
21
+ "som_prediction": "punctuated",
22
  "reasoning_length": 69,
23
  "has_think": false,
24
  "has_plan": false,
25
  "has_answer": true,
26
  "has_decompose": false,
27
  "think_preview": "",
28
+ "answer_preview": "ReasoningEngine disabled. SOM prediction: punctuated",
29
+ "raw_response_preview": "<answer>ReasoningEngine disabled. SOM prediction: punctuated</answer>",
30
  "n_tags": 1,
31
+ "latency_ms": 4.607677459716797
32
  },
33
  {
34
  "query": "Lula reserva valor",
 
36
  "context_provided": false,
37
  "system_prompt_used": false,
38
  "few_shot_examples": false,
39
+ "som_prediction": "punctuated",
40
  "reasoning_length": 69,
41
  "has_think": false,
42
  "has_plan": false,
43
  "has_answer": true,
44
  "has_decompose": false,
45
  "think_preview": "",
46
+ "answer_preview": "ReasoningEngine disabled. SOM prediction: punctuated",
47
+ "raw_response_preview": "<answer>ReasoningEngine disabled. SOM prediction: punctuated</answer>",
48
  "n_tags": 1,
49
+ "latency_ms": 4.328012466430664
50
  },
51
  {
52
  "query": "Amazonas força-tarefa vítimas",
 
54
  "context_provided": false,
55
  "system_prompt_used": false,
56
  "few_shot_examples": false,
57
+ "som_prediction": "punctuated",
58
  "reasoning_length": 69,
59
  "has_think": false,
60
  "has_plan": false,
61
  "has_answer": true,
62
  "has_decompose": false,
63
  "think_preview": "",
64
+ "answer_preview": "ReasoningEngine disabled. SOM prediction: punctuated",
65
+ "raw_response_preview": "<answer>ReasoningEngine disabled. SOM prediction: punctuated</answer>",
66
  "n_tags": 1,
67
+ "latency_ms": 4.455089569091797
68
  }
69
  ],
70
  "summary": {
 
72
  "n_with_think": 0,
73
  "answer_rate": 1.0,
74
  "think_rate": 0.0,
75
+ "avg_latency_ms": 4.463593165079753,
76
  "avg_reasoning_length": 69.0
77
  },
78
  "quality_assessment": {