Files
rustytorch/crates/training/rtx-transformers/Cargo.toml
T
osobhandClaude Fable 5 ac3f2af06b
CI / Format Check (push) Failing after 6s
CI / Build (ubuntu-latest) (push) Failing after 5s
Documentation / Build API Documentation (push) Failing after 7s
Documentation / Build User Guide (push) Successful in 8s
CI / Build (macos-latest) (push) Failing after 11s
CI / Test (macos-latest) (push) Has been skipped
CI / Test (ubuntu-latest) (push) Has been skipped
CI / Python Bindings (maturin) (macos-latest) (push) Has been skipped
CI / Python Bindings (maturin) (ubuntu-latest) (push) Has been skipped
CI / WASM Build + Size Check (push) Has been skipped
CI / Distributed Training Tests (push) Has been skipped
Performance Benchmarks / Run Benchmarks (push) Successful in 29s
CI / Clippy Check (push) Failing after 15s
CI / Build CPU-Only (Explicit) (push) Failing after 49s
CI / CI Success (push) Failing after 0s
feat(jepa): eval in the training loop, NCCL GPU AllReduce, GPU checkpointing
- Eval: run_jepa_training now runs k-NN (k=5) + linear-probe evaluation
  every eval_every steps and at the end (deduped when aligned);
  JepaEvalResult recorded in JepaTrainingSummary (final_knn_acc /
  final_probe_acc), printed by the CLI, appended as an # eval section
  to the metrics CSV. Probe set is deterministic LCG synthetic (offset
  seed, never aliases training batches) or real shard labels when
  loaded.
- NCCL: real GPU-direct AllReduce backend behind the new `nccl`
  feature (cudarc/nccl, dlopen-based so builds don't need libnccl).
  NCCL unique id is bootstrapped over the existing TCP rendezvous
  (master_port+137); data path is htod -> ncclAllReduce(Sum) -> dtoh
  -> mean. catch_unwind guards cudarc's panic-on-missing-lib so
  training falls back instead of aborting. Verified for real on the
  RTX 5060 Ti: single-rank GPU all_reduce identity test passes
  (26/26 with --features nccl).
- GPU checkpointing/eval: JepaTrainerV2::context_encoder_cpu_weights()
  exposes host-side weights for both CPU and GPU encoders
  (GpuViTEncoder::cpu_weights); checkpoint save and eval now work for
  GPU training runs (verified: .jepa binaries written and 2 eval
  passes during a live GPU CLI run). Resume with a GPU encoder
  restores the step counter and warns that weight re-upload is not
  yet implemented rather than silently training on stale weights.

125 runner/distributed/vit tests pass; CLI 8/8; cuda check clean.

Co-Authored-By: Claude Fable 5 <[email protected]>
2026-07-10 03:51:36 -07:00

241 lines
5.9 KiB
TOML

[package]
name = "rtx-transformers"
version = "1.0.0"
edition.workspace = true
rust-version = "1.92"
authors.workspace = true
license.workspace = true
repository.workspace = true
description = "Complete transformer training infrastructure with revolutionary quantum/neuromorphic/edge integration"
[dependencies]
# Core RTX dependencies - enabled for autograd integration
rtx-tensor = { workspace = true }
rtx-autograd = { workspace = true }
# Essential dependencies
anyhow = { workspace = true }
thiserror = { workspace = true }
tracing = { workspace = true }
tracing-subscriber = { workspace = true }
serde = { workspace = true }
serde_json = { workspace = true }
tokio = { workspace = true }
# Math and collections
nalgebra = { workspace = true }
indexmap = { workspace = true }
dashmap = { workspace = true }
rand = { workspace = true }
num-complex = { workspace = true }
base64 = { workspace = true }
reqwest = { workspace = true }
# Async runtime
futures = { workspace = true }
# Time handling
chrono = { workspace = true }
# GPU acceleration - CUDA
cudarc = { workspace = true, optional = true }
# Additional dependencies
parking_lot = { workspace = true }
rtx-runtime = { workspace = true }
rtx-flash-attention = { workspace = true }
rtx-vision = { path = "../../models/rtx-vision", version = "1.0.0", optional = true }
# Text processing
regex = "1.10"
unicode-normalization = "0.1"
approx = "0.5"
# Async trait support
async-trait = "0.1"
# Curriculum learning dependencies
ordered-float = "4.2"
# Modular networks dependencies
uuid = { version = "1.0", features = ["v4"] }
semver = "1.0"
# JPEG/PNG decoding for WebDataset shards (jepa_data), optional
image = { workspace = true, optional = true }
# Gzip decompression for .tar.gz WebDataset shards (jepa_data)
flate2 = "1.0"
[target.'cfg(target_os = "macos")'.dependencies]
# Metal GPU acceleration for Apple Silicon
objc2 = { version = "0.6", optional = true, features = ["std"] }
objc2-metal = { version = "0.3", optional = true }
objc2-foundation = { version = "0.3", optional = true }
block2 = { version = "0.6", optional = true }
[dev-dependencies]
tokio-test = { workspace = true }
proptest = { workspace = true }
criterion = { workspace = true }
tempfile = { workspace = true }
approx = "0.5"
[features]
# No default GPU - select cuda or metal explicitly based on your platform
default = []
cuda = ["cudarc", "rtx-flash-attention/cuda", "rtx-tensor/cuda", "rtx-runtime/cuda"]
metal = ["rtx-flash-attention/metal", "rtx-tensor/metal", "rtx-runtime/metal", "dep:objc2", "dep:objc2-metal", "dep:objc2-foundation", "dep:block2"]
cpu = ["rtx-tensor/cpu"]
# Real NCCL GPU-direct AllReduce for JEPA gradient sync (jepa_distributed.rs).
# Requires a CUDA GPU and libnccl.so discoverable at runtime (cudarc uses
# dynamic-loading/dlopen for NCCL by default, so this feature builds fine
# without libnccl present; it only fails at the point a `GradSyncBackend::Nccl`
# handle is actually used at runtime).
nccl = ["cuda", "cudarc/nccl"]
disabled_tests = []
vision-bridge = ["rtx-vision"]
# Real JPEG/PNG pixel decoding for WebDataset records; without it,
# webdataset_record_to_image falls back to placeholder pixels.
image-decode = ["dep:image"]
# Binary targets commented out - missing source files
# [[bin]]
# name = "test_autograd_compilation"
# path = "test_autograd_compilation.rs"
# [[bin]]
# name = "test_structured_sparsity_standalone"
# path = "src/layers/structured_sparsity_standalone_test.rs"
# [[bin]]
# name = "test_ademamix_standalone"
# path = "test_ademamix_standalone.rs"
# [[bin]]
# name = "hybrid_ssm_test_standalone"
# path = "hybrid_ssm_test_standalone.rs"
# [[bin]]
# name = "alibi_standalone_test"
# path = "alibi_standalone_test.rs"
# Examples disabled by default - require disabled_tests feature
[[example]]
name = "adabound_demo"
required-features = ["disabled_tests"]
[[example]]
name = "barlow_twins_demo"
required-features = ["disabled_tests"]
[[example]]
name = "beit_demo"
required-features = ["disabled_tests"]
[[example]]
name = "cpc_demo"
required-features = ["disabled_tests"]
[[example]]
name = "curriculum_learning_demo"
required-features = ["disabled_tests"]
[[example]]
name = "expert_dropout_demo"
required-features = ["disabled_tests"]
[[example]]
name = "fomaml_demo"
required-features = ["disabled_tests"]
[[example]]
name = "head_drop_standalone_demo"
required-features = ["disabled_tests"]
[[example]]
name = "lbfgs_demo"
required-features = ["disabled_tests"]
[[example]]
name = "mamba_cuda_demo"
required-features = ["disabled_tests"]
[[example]]
name = "mamba_demo"
required-features = ["disabled_tests"]
[[example]]
name = "mean_teacher_demo"
required-features = ["disabled_tests"]
[[example]]
name = "mega_demo"
required-features = ["disabled_tests"]
[[example]]
name = "moco_v3_example"
required-features = ["disabled_tests"]
[[example]]
name = "normalization_demo"
required-features = ["disabled_tests"]
[[example]]
name = "pipeline_parallelism_demo"
required-features = ["disabled_tests"]
[[example]]
name = "pseudo_labeling_demo"
required-features = ["disabled_tests"]
[[example]]
name = "rag_complete_demo"
required-features = ["disabled_tests"]
[[example]]
name = "retnet_linear_attention_demo"
required-features = ["disabled_tests"]
[[example]]
name = "simple_head_drop_demo"
required-features = ["disabled_tests"]
[[example]]
name = "specaugment_demo"
required-features = ["disabled_tests"]
[[example]]
name = "ssl_demo"
required-features = ["disabled_tests"]
[[example]]
name = "ssm_state_cache_demo"
required-features = ["disabled_tests"]
[[example]]
name = "vat_demo"
required-features = ["disabled_tests"]
[[example]]
name = "vicreg_demo"
required-features = ["disabled_tests"]
[[example]]
name = "vicreg_ssl_integration"
required-features = ["disabled_tests"]
# Metal MoE Benchmarks
[[bench]]
name = "metal_moe_bench"
harness = false
# Metal Mamba Benchmarks
[[bench]]
name = "metal_mamba_bench"
harness = false
[lints]
workspace = true