leitaofilho commited on
Commit
49cbec3
·
verified ·
1 Parent(s): 19b3d58

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +140 -127
README.md CHANGED
@@ -92,7 +92,7 @@ configs:
92
  path: data/validation.parquet
93
  - split: test
94
  path: data/test.parquet
95
- license: apache-2.0
96
  task_categories:
97
  - text-generation
98
  language:
@@ -106,186 +106,199 @@ tags:
106
  - multimodal-text
107
  - code-generation
108
  - enedina
 
 
109
  size_categories:
110
  - 10K<n<100K
111
  ---
112
 
113
- # Mini-Enedina Dataset: Timoshenko Beam Analysis (60k)
114
 
115
- Dataset de treinamento para o modelo [Mini-Enedina 37.5M](https://huggingface.co/aiacontext/mini-enedina) -- um language model especializado em analise estrutural de eixos de transmissao usando Teoria de Vigas de Timoshenko.
116
 
117
- ## Descricao
118
 
119
- 60.000 conversacoes sinteticas em formato **Harmony-Enedina** (variante do ChatML), cobrindo 3 niveis de complexidade progressiva de analise de eixos:
120
 
121
- | Nivel | Analise | Amostras | Tokens/amostra (media) |
122
- |-------|---------|----------|------------------------|
123
- | **Bachelor** | Deflexao (V, M, w, theta) | 20,000 | 8,394 |
124
- | **Master** | + Tensao (Von Mises, sigma_adm) | 20,000 | 9,883 |
125
- | **Doctor** | + Fadiga (Marin, Goodman) | 20,000 | 12,775 |
126
 
127
- **Total:** 621M tokens (vocabulario de 32,768 tokens via BPE customizado).
128
 
129
- ## Formato Harmony-Enedina
130
 
131
- Cada amostra contem uma conversacao completa em formato Harmony com 2 canais (reasoning + response) e metacognicao via headers:
 
 
132
 
133
  ```
134
  <|system|>
135
- Voce e Enedina, uma engenheira estrutural...
136
  <|end|>
137
  <|user|>
138
- Analise o eixo de transmissao com os seguintes parametros...
139
  <|end|>
140
  <|assistant|>
141
  <|ch1_start|>thinking<|ch1_end|>
142
- [Raciocinio tecnico detalhado]
143
  <|ch2_start|>response<|ch2_end|>
144
- [Resposta formatada com equacoes LaTeX e codigo Python]
145
  <|end|>
146
  <|return|>
147
  ```
148
 
149
- ## Features (36 colunas)
150
-
151
- ### Identificacao
152
- | Coluna | Tipo | Descricao |
153
- |--------|------|-----------|
154
- | `id` | string | Hash SHA-256 unico do sample |
155
- | `problem_type` | string | Sempre `shaft_timoshenko` |
156
- | `problem_class` | string | Classe do problema |
157
- | `level` | string | `bachelor`, `master` ou `doctor` |
158
- | `curriculum_stage` | int32 | Estagio no curriculum (0, 1, 2) |
159
- | `analysis_depth` | string | `deflection`, `stress` ou `fatigue` |
160
-
161
- ### Parametros do Eixo
162
- | Coluna | Tipo | Descricao |
163
- |--------|------|-----------|
164
- | `D_ext_mm` | float64 | Diametro externo [mm] |
165
- | `D_int_mm` | float64 | Diametro interno [mm] (0 para macico) |
166
- | `L_mm` | float64 | Comprimento do eixo [mm] |
167
- | `section_type` | string | `macico` ou `vazado` |
168
- | `L_D_ratio` | float64 | Razao L/D (esbeltez) |
169
- | `material_name` | string | Nome do material (ex: AISI 1045) |
170
- | `E_GPa` | float64 | Modulo de Young [GPa] |
171
- | `S_y_MPa` | float64 | Tensao de escoamento [MPa] |
172
- | `S_ut_MPa` | float64 | Tensao ultima [MPa] |
173
-
174
- ### Carregamento
175
- | Coluna | Tipo | Descricao |
176
- |--------|------|-----------|
177
- | `n_loads` | int32 | Numero de cargas aplicadas |
178
- | `n_bearings` | int32 | Numero de mancais |
179
- | `total_load_kN` | float64 | Carga total [kN] |
180
-
181
- ### Resultados da Analise
182
- | Coluna | Tipo | Descricao |
183
- |--------|------|-----------|
184
- | `V_max_kN` | float64 | Cortante maximo [kN] |
185
- | `M_max_kNmm` | float64 | Momento fletor maximo [kN.mm] |
186
- | `w_max_mm` | float64 | Deflexao maxima [mm] |
187
- | `w_limit_mm` | float64 | Deflexao limite [mm] |
188
-
189
- ### Validacao
190
- | Coluna | Tipo | Descricao |
191
- |--------|------|-----------|
192
- | `validation_passed` | bool | Todas as validacoes OK |
193
- | `deflection_passed` | bool | Deflexao dentro do limite |
194
- | `stress_passed` | string | Resultado da analise de tensao |
195
- | `fatigue_passed` | string | Resultado da analise de fadiga |
196
- | `difficulty_score` | float64 | Score de dificuldade [0-1] |
197
-
198
- ### Conversacao
199
- | Coluna | Tipo | Descricao |
200
- |--------|------|-----------|
201
- | `conversation` | string | Conversacao completa em formato Harmony |
202
- | `user_tokens` | int32 | Tokens no prompt do usuario |
203
- | `assistant_tokens` | int32 | Tokens na resposta do assistente |
204
- | `total_tokens` | int32 | Total de tokens na conversacao |
 
 
205
 
206
  ### Metadata
207
- | Coluna | Tipo | Descricao |
208
- |--------|------|-----------|
209
- | `expected_route` | string | Rota esperada (bachelor/master/doctor) |
210
- | `split` | string | Split: `train`, `val` ou `test` |
211
- | `fold` | int32 | Fold para cross-validation |
212
- | `solve_time_ms` | float64 | Tempo de resolucao [ms] |
213
- | `template_variation` | int32 | Variacao do template utilizada |
214
-
215
- ## Estatisticas de Tokens
216
-
217
- | Metrica | Valor |
218
- |---------|-------|
219
- | Total de tokens | 621,028,968 |
220
- | Media por amostra | 10,350 |
221
- | Minimo | 8,280 |
222
- | Maximo | 12,996 |
223
- | Mediana | 9,881 |
224
- | Tokens usuario (media) | 358 |
225
- | Tokens assistente (media) | 9,932 |
226
-
227
- ## Uso
228
 
229
  ```python
230
  from datasets import load_dataset
231
 
232
  dataset = load_dataset("aiacontext/mini-enedina-dataset")
233
 
234
- # Acessar splits
235
- train = dataset["train"] # 48,000 amostras
236
- val = dataset["validation"] # 6,000 amostras
237
- test = dataset["test"] # 6,000 amostras
238
 
239
- # Exemplo: filtrar por nivel
240
  bachelor = train.filter(lambda x: x["level"] == "bachelor")
241
  doctor = train.filter(lambda x: x["level"] == "doctor")
242
 
243
- # Acessar conversacao
244
  sample = train[0]
245
  print(sample["conversation"][:500])
246
  print(f"Tokens: {sample['total_tokens']}")
247
  print(f"Level: {sample['level']}")
248
  ```
249
 
250
- ## Geracao dos Dados
251
 
252
- Os dados foram gerados pelo **Factorium SciML** -- um framework Julia/Python para geracao de dados sinteticos cientificos:
253
 
254
- 1. **Solver numerico** (Python/NumPy): resolve cada problema de Timoshenko com parametros aleatorios
255
- 2. **Templates variaveis**: 97k combinacoes de descricoes em PT-BR (46^3 variacoes)
256
- 3. **Grounding numerico**: sistema de citacoes que garante consistencia entre parametros de entrada e valores na resposta
257
- 4. **Validacao**: cada sample e verificado (deflexao, tensao, fadiga) antes de inclusao
258
 
259
- ### Equacoes Governantes (Timoshenko com peso proprio)
260
 
261
  ```
262
- V(x) = RA - q*x - sum(Fi * H(x - xi)) (Esforco cortante)
263
- M(x) = RA*x - q*x^2/2 - sum(Fi*(x-xi)*H(x-xi)) (Momento fletor)
264
- dw/dx = theta + V/(kappa*G*A) (Deflexao com cisalhamento)
265
- q = rho * g * A * 1e-9 (Carga distribuida [N/mm])
266
  ```
267
 
268
- ## Modelo Treinado
269
-
270
- O modelo treinado com este dataset esta disponivel em: [aiacontext/mini-enedina](https://huggingface.co/aiacontext/mini-enedina)
271
 
272
- - **Arquitetura:** Dense Transformer (RoPE, RMSNorm, SwiGLU)
273
- - **Parametros:** 37.5M
274
- - **Framework:** MLX (Apple Silicon)
275
- - **Test Loss:** 0.0787 | **Test PPL:** 1.08
276
 
277
- ## Licenca
 
 
 
 
 
 
278
 
279
- Apache 2.0
280
 
281
- ## Citacao
282
 
283
  ```bibtex
284
- @misc{mini-enedina-dataset-2026,
285
- title={Mini-Enedina Dataset: Timoshenko Beam Analysis},
286
- author={AIA Context},
287
- year={2026},
288
- publisher={Hugging Face},
289
- url={https://huggingface.co/datasets/aiacontext/mini-enedina-dataset}
290
  }
291
  ```
 
 
 
 
 
 
 
 
 
92
  path: data/validation.parquet
93
  - split: test
94
  path: data/test.parquet
95
+ license: cc-by-4.0
96
  task_categories:
97
  - text-generation
98
  language:
 
106
  - multimodal-text
107
  - code-generation
108
  - enedina
109
+ - validated-synthetic-data
110
+ - physics-informed-ai
111
  size_categories:
112
  - 10K<n<100K
113
  ---
114
 
115
+ # Mini-Enedina Dataset: Physically Validated Timoshenko Shaft Analysis (60k)
116
 
117
+ Training dataset for [Mini-Enedina 37.5M](https://huggingface.co/aiacontext/mini-enedina) -- a monotropic language model deliberately small and intensively specialized for structural shaft analysis according to Timoshenko beam theory.
118
 
119
+ ## Dataset Description
120
 
121
+ 60,000 synthetic conversations in **Harmony-Enedina** format (a ChatML variant), covering three progressively complex levels of shaft analysis:
122
 
123
+ | Level | Analysis Scope | Samples | Avg. Tokens/Sample |
124
+ |-------|---------------|---------|---------------------|
125
+ | **Bachelor** | Deflection (V, M, w, theta) | 20,000 | 8,394 |
126
+ | **Master** | + Von Mises stress (sigma_VM, sigma_adm) | 20,000 | 9,883 |
127
+ | **Doctor** | + Fatigue (Marin factors, Goodman criterion) | 20,000 | 12,775 |
128
 
129
+ **Total:** 621M tokens (custom 8,012-token BPE vocabulary).
130
 
131
+ Every sample is **physically validated** -- the numerical solver runs to completion, and deflection, stress, and fatigue checks are verified before inclusion in the dataset.
132
 
133
+ ## Conversation Format: Harmony-Enedina
134
+
135
+ Each sample contains a complete conversation with two semantic channels (reasoning + response) and metacognition via headers:
136
 
137
  ```
138
  <|system|>
139
+ You are Enedina, a structural engineer...
140
  <|end|>
141
  <|user|>
142
+ Analyze the transmission shaft with the following parameters...
143
  <|end|>
144
  <|assistant|>
145
  <|ch1_start|>thinking<|ch1_end|>
146
+ [Detailed technical reasoning]
147
  <|ch2_start|>response<|ch2_end|>
148
+ [Formatted response with LaTeX equations and Python solver code]
149
  <|end|>
150
  <|return|>
151
  ```
152
 
153
+ Domain-specific tokens (`<|shaft|>`, `<|python|>`, `<|numerical|>`, `<|latex|>`) demarcate semantic boundaries within the output. The training language is Brazilian Portuguese.
154
+
155
+ ## Features (36 columns)
156
+
157
+ ### Identification
158
+ | Column | Type | Description |
159
+ |--------|------|-------------|
160
+ | `id` | string | Unique SHA-256 hash |
161
+ | `problem_type` | string | Always `shaft_timoshenko` |
162
+ | `problem_class` | string | Problem class |
163
+ | `level` | string | `bachelor`, `master`, or `doctor` |
164
+ | `curriculum_stage` | int32 | Curriculum stage (0, 1, 2) |
165
+ | `analysis_depth` | string | `deflection`, `stress`, or `fatigue` |
166
+
167
+ ### Shaft Parameters
168
+ | Column | Type | Description |
169
+ |--------|------|-------------|
170
+ | `D_ext_mm` | float64 | External diameter [mm] |
171
+ | `D_int_mm` | float64 | Internal diameter [mm] (0 for solid) |
172
+ | `L_mm` | float64 | Shaft length [mm] |
173
+ | `section_type` | string | `macico` (solid) or `vazado` (hollow) |
174
+ | `L_D_ratio` | float64 | L/D ratio (slenderness) |
175
+ | `material_name` | string | Material name (e.g., AISI 1045) |
176
+ | `E_GPa` | float64 | Young's modulus [GPa] |
177
+ | `S_y_MPa` | float64 | Yield strength [MPa] |
178
+ | `S_ut_MPa` | float64 | Ultimate tensile strength [MPa] |
179
+
180
+ ### Loading
181
+ | Column | Type | Description |
182
+ |--------|------|-------------|
183
+ | `n_loads` | int32 | Number of applied loads |
184
+ | `n_bearings` | int32 | Number of bearings |
185
+ | `total_load_kN` | float64 | Total load [kN] |
186
+
187
+ ### Analysis Results
188
+ | Column | Type | Description |
189
+ |--------|------|-------------|
190
+ | `V_max_kN` | float64 | Maximum shear force [kN] |
191
+ | `M_max_kNmm` | float64 | Maximum bending moment [kN.mm] |
192
+ | `w_max_mm` | float64 | Maximum deflection [mm] |
193
+ | `w_limit_mm` | float64 | Deflection limit [mm] |
194
+
195
+ ### Validation
196
+ | Column | Type | Description |
197
+ |--------|------|-------------|
198
+ | `validation_passed` | bool | All validations passed |
199
+ | `deflection_passed` | bool | Deflection within limit |
200
+ | `stress_passed` | string | Stress analysis result |
201
+ | `fatigue_passed` | string | Fatigue analysis result |
202
+ | `difficulty_score` | float64 | Difficulty score [0-1] |
203
+
204
+ ### Conversation
205
+ | Column | Type | Description |
206
+ |--------|------|-------------|
207
+ | `conversation` | string | Full conversation in Harmony format |
208
+ | `user_tokens` | int32 | User prompt token count |
209
+ | `assistant_tokens` | int32 | Assistant response token count |
210
+ | `total_tokens` | int32 | Total conversation token count |
211
 
212
  ### Metadata
213
+ | Column | Type | Description |
214
+ |--------|------|-------------|
215
+ | `expected_route` | string | Expected route (bachelor/master/doctor) |
216
+ | `split` | string | Split: `train`, `val`, or `test` |
217
+ | `fold` | int32 | Cross-validation fold |
218
+ | `solve_time_ms` | float64 | Solver execution time [ms] |
219
+ | `template_variation` | int32 | Template variation used |
220
+
221
+ ## Token Statistics
222
+
223
+ | Metric | Value |
224
+ |--------|-------|
225
+ | Total tokens | 621,028,968 |
226
+ | Mean per sample | 10,350 |
227
+ | Minimum | 8,280 |
228
+ | Maximum | 12,996 |
229
+ | Median | 9,881 |
230
+ | User tokens (mean) | 358 |
231
+ | Assistant tokens (mean) | 9,932 |
232
+
233
+ ## Usage
234
 
235
  ```python
236
  from datasets import load_dataset
237
 
238
  dataset = load_dataset("aiacontext/mini-enedina-dataset")
239
 
240
+ # Access splits
241
+ train = dataset["train"] # 48,000 samples
242
+ val = dataset["validation"] # 6,000 samples
243
+ test = dataset["test"] # 6,000 samples
244
 
245
+ # Filter by level
246
  bachelor = train.filter(lambda x: x["level"] == "bachelor")
247
  doctor = train.filter(lambda x: x["level"] == "doctor")
248
 
249
+ # Access a conversation
250
  sample = train[0]
251
  print(sample["conversation"][:500])
252
  print(f"Tokens: {sample['total_tokens']}")
253
  print(f"Level: {sample['level']}")
254
  ```
255
 
256
+ ## Data Generation
257
 
258
+ The data was generated by **Factorium SciML** -- a Julia/Python framework for scientific synthetic data generation:
259
 
260
+ 1. **Numerical solver** (Python/NumPy): solves each Timoshenko problem with randomized parameters
261
+ 2. **Variable templates**: 97k description combinations in PT-BR (46^3 variations)
262
+ 3. **Numerical grounding**: a citation system that ensures consistency between input parameters and values in the response
263
+ 4. **Validation**: every sample is verified (deflection, stress, fatigue) before inclusion
264
 
265
+ ### Governing Equations (Timoshenko with self-weight)
266
 
267
  ```
268
+ V(x) = RA - q*x - sum(Fi * H(x - xi)) (Shear force)
269
+ M(x) = RA*x - q*x^2/2 - sum(Fi*(x-xi)*H(x-xi)) (Bending moment)
270
+ dw/dx = theta + V/(kappa*G*A) (Deflection with shear)
271
+ q = rho * g * A * 1e-9 (Distributed self-weight [N/mm])
272
  ```
273
 
274
+ ## Trained Model
 
 
275
 
276
+ The model trained on this dataset is available at: [aiacontext/mini-enedina](https://huggingface.co/aiacontext/mini-enedina)
 
 
 
277
 
278
+ | Parameter | Value |
279
+ |-----------|-------|
280
+ | **Architecture** | Dense Transformer (RoPE, RMSNorm, SwiGLU) |
281
+ | **Parameters** | 37.5M |
282
+ | **Framework** | MLX (Apple Silicon) |
283
+ | **Test Loss** | 0.0787 |
284
+ | **Test Perplexity** | 1.08 |
285
 
286
+ ## Citation
287
 
288
+ If you use this dataset, please cite:
289
 
290
  ```bibtex
291
+ @article{leitaofilho2026minienedina,
292
+ title={Mini-Enedina: A Domain-Specialized Small Language Model for Structural Shaft Analysis Using Timoshenko Beam Theory},
293
+ author={Leit{\~a}o Filho, Antonio de Sousa and Barros Filho, Allan Kardec Duailibe and Lima, Fabr{\'i}cio Saul and Santos, Selby Mykael Lima dos and Sousa, Rejani Bandeira Vieira},
294
+ year={2026}
 
 
295
  }
296
  ```
297
+
298
+ ## Acknowledgments
299
+
300
+ This work was supported by Aia Context Ltda. and by FINEP -- Funding Authority for Studies and Projects, a Brazilian government agency for science, technology, and innovation linked to the Ministry of Science, Technology and Innovation (MCTI), under Contract No. 03.25.0080.00.
301
+
302
+ ## License
303
+
304
+ CC-BY-4.0