Skip to main content

Crate entrenar

Crate entrenar 

Source
Expand description

§Entrenar: Training & Optimization Library

Entrenar provides a tape-based autograd engine with optimizers, LoRA/QLoRA, quantization (QAT/PTQ), model merging (TIES/DARE/SLERP), and knowledge distillation.

§Architecture

  • autograd: Tape-based automatic differentiation
  • optim: Optimizers (SGD, Adam, AdamW)
  • lora: Low-rank adaptation with QLoRA support
  • quant: Quantization-aware training and post-training quantization
  • merge: Model merging methods
  • distill: Knowledge distillation
  • config: Declarative YAML configuration
  • train: High-level training loop
  • io: Model saving and loading (JSON, YAML formats)
  • hf_pipeline: HuggingFace model fetching and distillation
  • citl: Compiler-in-the-Loop training with RAG-based fix suggestions (feature-gated)
  • efficiency: Cost tracking, device detection, and performance benchmarking
  • eval: Model evaluation framework with metrics, comparison, and drift detection
  • sovereign: Air-gapped deployment and distribution packaging
  • research: Academic research artifacts, citations, and archive deposits
  • ecosystem: PAIML stack integrations (Batuta, Realizar, Ruchy)
  • dashboard: Real-time training monitoring and WASM bindings
  • yaml_mode: Declarative YAML Mode Training (v1.0 spec)
  • transformer: Transformer layers with autograd support
  • moe: Mixture of Experts sparse routing layer
  • decision: Decision pattern storage and CITL trainer (GH-28, GH-29)
  • cli: Command-line interface handlers
  • finetune: Fine-tuning pipeline with Popperian QA (SPEC-FT-001)

Re-exports§

pub use autograd::backward;
pub use autograd::Context;
pub use autograd::Tensor;
pub use error::Error;
pub use error::Result;

Modules§

aprender_compat
Aprender Compatibility Layer
autograd
Tape-based autograd engine
citl
Compiler-in-the-Loop (CITL) training module
cli
CLI module for entrenar
config
Declarative YAML configuration
dashboard
Dashboard Module (Phase 2: ENT-003, ENT-004)
decision
Decision pattern storage and CITL trainer module
distill
Knowledge Distillation
ecosystem
Ecosystem Integration (Phase 9)
efficiency
Efficiency & Cost Tracking Module (ENT-008 through ENT-012)
error
Error types for Entrenar
eval
Model Evaluation Framework (APR-073)
finetune
Fine-tuning pipeline for code generation models
generative
Generative Models for Code Synthesis
gpu
GPU resource management and multi-node training infrastructure.
hf_pipeline
HuggingFace Distillation & Learning Pipeline
inference
Inference — model inference and serving utilities
integrity
Behavioral Integrity & Lineage Module (ENT-013, ENT-014, ENT-015)
io
Model I/O - Loading and saving models
lora
LoRA (Low-Rank Adaptation) implementation
merge
Model merging methods (TIES, DARE, SLERP)
models
Model architecture scaffolds for aprender-train.
moe
Mixture of Experts (MoE) layer
monitor
Real-time Training Monitoring Module
numerical
Numerical utilities for numerically stable computation
optim
Optimizers for training neural networks
pipeline
Pipeline — standardized connectors for training pipelines
prune
Neural network pruning integration for Entrenar
quality
Quality Gates Module (ENT-005, ENT-006, ENT-007)
quant
Quantization: QAT and PTQ
research
Academic Research Artifacts (Phase 7)
run
Run Struct with Renacer Integration (ENT-002)
safety
Panic safety and graceful degradation
search
MCTS (Monte Carlo Tree Search) for Code Generation
server
REST/HTTP API Server (#67)
sovereign
Sovereign Deployment Module (ENT-016 through ENT-018)
sovereign_array
Sovereign array types — Vec-backed replacements for ndarray Array1/Array2.
staging
Model Staging Workflows (GH-70)
storage
Experiment Storage Module (ENT-001)
tokenizer
Subword Tokenization Module (#26)
trace
Training Trace Module (ITP-SPEC-001)
tracking
Experiment Tracking Module (GH-31)
train
High-level training loop
training
Training — top-level training module re-exports
transformer
Transformer module with full model implementation and weight loading
yaml_mode
YAML Mode Training - Declarative, No-Code Training Interface

Macros§

array
Macro to create Array2 from nested arrays (replaces ndarray::array!)