Upload config.yaml with huggingface_hub
Browse files- config.yaml +113 -0
config.yaml
ADDED
|
@@ -0,0 +1,113 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# MTP Mini - Configuraci贸n MEJORADA x20 para Alto Rendimiento
|
| 2 |
+
|
| 3 |
+
model:
|
| 4 |
+
vocab_size: 8000 # Vocabulario ampliado
|
| 5 |
+
d_model: 1024 # x2 dimensi贸n (m谩s capacidad)
|
| 6 |
+
n_layers: 24 # x3 capas (razonamiento profundo)
|
| 7 |
+
n_heads: 16 # x2 atenci贸n (mejor comprensi贸n)
|
| 8 |
+
d_ff: 4096 # 4x d_model (m谩s procesamiento)
|
| 9 |
+
max_seq_len: 1024 # x2 contexto (m谩s memoria)
|
| 10 |
+
dropout: 0.15 # Menos dropout (modelo m谩s grande)
|
| 11 |
+
use_swiglu: true # Activaci贸n mejorada
|
| 12 |
+
use_flash_attention: true # Optimizaci贸n de atenci贸n
|
| 13 |
+
|
| 14 |
+
# Nuevas capacidades avanzadas
|
| 15 |
+
use_reasoning_layer: true # Capa de razonamiento expl铆cito
|
| 16 |
+
reasoning_steps: 3 # Pasos de razonamiento interno
|
| 17 |
+
use_confidence_score: true # Puntuaci贸n de confianza
|
| 18 |
+
use_memory_retrieval: true # Recuperaci贸n de memoria contextual
|
| 19 |
+
|
| 20 |
+
training:
|
| 21 |
+
batch_size: 8 # Batch m谩s grande
|
| 22 |
+
accumulation_steps: 8 # Effective batch = 64
|
| 23 |
+
epochs: 40 # M谩s 茅pocas para dataset grande
|
| 24 |
+
learning_rate: 0.0002 # LR ajustado para modelo grande
|
| 25 |
+
min_lr: 0.000005
|
| 26 |
+
weight_decay: 0.15 # M谩s regularizaci贸n
|
| 27 |
+
max_grad_norm: 1.0
|
| 28 |
+
num_threads: 8
|
| 29 |
+
save_every: 3
|
| 30 |
+
|
| 31 |
+
# Early stopping ajustado
|
| 32 |
+
patience: 8 # M谩s paciencia para convergencia
|
| 33 |
+
min_delta: 0.0005 # Delta m谩s fino
|
| 34 |
+
|
| 35 |
+
# Learning rate schedule
|
| 36 |
+
warmup_steps: 500 # M谩s warmup para modelo grande
|
| 37 |
+
use_lr_scheduler: true
|
| 38 |
+
scheduler_type: "cosine" # Cosine annealing
|
| 39 |
+
|
| 40 |
+
# Regularizaci贸n mejorada
|
| 41 |
+
label_smoothing: 0.1
|
| 42 |
+
use_eos_loss_weight: true
|
| 43 |
+
mixup_alpha: 0.2 # Mixup para generalizaci贸n
|
| 44 |
+
|
| 45 |
+
# Optimizaci贸n avanzada
|
| 46 |
+
use_gradient_checkpointing: true # Ahorrar memoria
|
| 47 |
+
use_mixed_precision: true # FP16 para velocidad
|
| 48 |
+
|
| 49 |
+
data:
|
| 50 |
+
corpus_path: corpus/mtp_mini_corpus.jsonl
|
| 51 |
+
min_text_length: 30
|
| 52 |
+
max_text_length: 3000 # Textos m谩s largos
|
| 53 |
+
validation_split: 0.12 # 88% train, 12% val
|
| 54 |
+
|
| 55 |
+
# Augmentaci贸n avanzada
|
| 56 |
+
use_augmentation: true
|
| 57 |
+
augmentation_prob: 0.4
|
| 58 |
+
use_back_translation: false # Desactivado (requiere modelo externo)
|
| 59 |
+
use_paraphrasing: true
|
| 60 |
+
|
| 61 |
+
# Filtrado de calidad
|
| 62 |
+
min_quality_score: 0.3
|
| 63 |
+
remove_duplicates: true
|
| 64 |
+
max_repetition_ratio: 0.3
|
| 65 |
+
|
| 66 |
+
generation:
|
| 67 |
+
# Par谩metros base
|
| 68 |
+
default_max_tokens: 200
|
| 69 |
+
default_temperature: 0.75
|
| 70 |
+
default_top_k: 50
|
| 71 |
+
default_top_p: 0.93
|
| 72 |
+
default_repetition_penalty: 1.2
|
| 73 |
+
min_response_length: 25
|
| 74 |
+
|
| 75 |
+
# Control de calidad avanzado
|
| 76 |
+
use_length_penalty: true
|
| 77 |
+
length_penalty_alpha: 0.8
|
| 78 |
+
use_perplexity_filter: true
|
| 79 |
+
max_perplexity: 80.0
|
| 80 |
+
use_confidence_threshold: true
|
| 81 |
+
min_confidence: 0.4 # Rechazar respuestas de baja confianza
|
| 82 |
+
|
| 83 |
+
# Anti-alucinaci贸n
|
| 84 |
+
use_fact_checking: true
|
| 85 |
+
use_source_grounding: true # Anclar respuestas en el contexto
|
| 86 |
+
hallucination_penalty: 2.0
|
| 87 |
+
|
| 88 |
+
# Capacidades especiales
|
| 89 |
+
enable_summarization: true
|
| 90 |
+
enable_rewriting: true
|
| 91 |
+
enable_comparison: true
|
| 92 |
+
enable_reasoning: true
|
| 93 |
+
|
| 94 |
+
# Stop sequences
|
| 95 |
+
stop_sequences:
|
| 96 |
+
- "###"
|
| 97 |
+
- "\n\n\n"
|
| 98 |
+
- "Instrucci贸n:"
|
| 99 |
+
- "[FIN]"
|
| 100 |
+
|
| 101 |
+
# Configuraci贸n de razonamiento
|
| 102 |
+
reasoning:
|
| 103 |
+
enable_chain_of_thought: true
|
| 104 |
+
thinking_tokens: 50 # Tokens internos para "pensar"
|
| 105 |
+
show_reasoning: false # No mostrar razonamiento interno
|
| 106 |
+
reasoning_temperature: 0.5 # M谩s determin铆stico para razonar
|
| 107 |
+
|
| 108 |
+
# Configuraci贸n de memoria
|
| 109 |
+
memory:
|
| 110 |
+
enable_context_memory: true
|
| 111 |
+
memory_size: 512 # Tokens de memoria contextual
|
| 112 |
+
similarity_threshold: 0.7 # Umbral para recuperaci贸n similar
|
| 113 |
+
max_retrieved_chunks: 3 # M谩x. fragmentos similares a recuperar
|