| nn.Module (state_dict, load_state_dict, hooks) |
β
Ready |
Full implementation |
| nn modules (Linear, Conv, Norm, RNN, Attention, etc.) |
β
Ready |
Comprehensive coverage |
| Optimizers & LR Schedulers |
β
Ready |
Adam, AdamW, SGD, etc. with state_dict |
| AMP (autocast + GradScaler) |
β
Ready |
Device-type dispatch |
| Serialization (save/load) |
β
Ready |
PyTorch zip checkpoint format |
| scaled_dot_product_attention |
β οΈ Naive composite |
No Flash/fused attention |
| DataLoader + Samplers |
β
Ready |
Multi-worker, pin_memory |
| Distributed (DDP, FSDP, collectives) |
β
Ready |
Gloo + HCCL backends |
| torch.utils.checkpoint |
β
Exists |
Needs HF integration validation |
| torch.library / custom_op |
β
Ready |
2-arg Library ctor only |
| compat/transformers test framework |
β
Ready |
Tier 1-3 model test runner |
| Meta device / to_empty() |
β Missing |
Blocks low_cpu_mem_usage loading |
| Native safetensors loading |
β In compat layer only |
Not in src/candle/ |
| Text generation (GenerationMixin) |
β Missing |
No generate(), KV-cache, sampling |
| torch.compile / _dynamo |
β οΈ No-op stub |
Blocks compiled model paths |
| Quantization (GPTQ/AWQ/bitsandbytes) |
β Stub only |
quantize_per_tensor raises RuntimeError |
| PEFT (LoRA adapter injection) |
β Untested |
Module internals may work |
| Accelerate integration |
β Untested |
Low-level pieces exist |
Goal
Make candle a drop-in PyTorch replacement for the entire HuggingFace ecosystem. Target:
Priority follows the HF dependency chain: transformers (core) β accelerate β peft β trl.
Current State
Sub-Issues
Phase 1: Foundation (Target: v0.1.1 β June 2026)
Module.to_empty()Library()3-arg constructorPhase 2: HF-Compatible Inference (Target: v0.2.0 β September 2026)
Phase 3: Training & Fine-Tuning (Target: v0.3.0 β December 2026)
Accelerator.prepare()compatibilityCross-Roadmap Duplicates
Success Criteria
from transformers import AutoModel; model = AutoModel.from_pretrained("bert-base-uncased")works without compat conftestmodel.generate()works for GPT-2/LLaMA-class models; tier-1 compat test pass rate β₯ 80%