Repository navigation
Releases
Releases · CanReader/FastNN
v0.3.3
What's Changed
Other changes
- Bump to 0.3.2 and keep the original description by @CanReader in #66
- Write a real crate page for docs.rs by @CanReader in #67
- Rewrite the README as a README by @CanReader in #69
- Move to the 2024 edition by @CanReader in #68
- Bump to 0.3.3 by @CanReader in #70
Full Changelog: v0.3.1...v0.3.3
v0.3.1
What's Changed
Documentation
- rework the readme by @CanReader in #41
- explain where the build finds nvcc and the cuda libraries by @CanReader in #44
- point hacktoberfest contributors at the starting issue by @CanReader in #57
Build and dependencies
- Update criterion requirement from 0.5 to 0.8 by @dependabot[bot] in #35
- build release binaries for linux, macos and windows by @CanReader in #40
- run the tests in release and on the msrv in ci by @CanReader in #43
Other changes
- set up ci and contributor workflow by @CanReader in #31
- update rand to 0.10 and rand_distr to 0.6 by @CanReader in #37
- stop dependabot from bumping the msrv toolchain by @CanReader in #39
- update ureq to 3 by @CanReader in #38
- validate learning rate schedule parameters by @Boulea7 in #42
- move the schedule tests into the module by @CanReader in #45
- avoid unused bias draws in linear no_bias by @Boulea7 in #58
- reject invalid float indices before conversion by @Boulea7 in #59
- reject variance of an empty tensor by @Boulea7 in #60
- Cleanup the code by @CanReader in #61
- Remove cuda kernels nothing calls by @CanReader in #62
- Fix the README examples and plain up the description by @CanReader in #63
- Bump to 0.3.1 and restore the plain description by @CanReader in #64
- Download release archives outside the checkout by @CanReader in #65
New Contributors
- @CanReader made their first contribution in #31
- @dependabot[bot] made their first contribution in #35
- @Boulea7 made their first contribution in #42
Special thnanks to @Boulea7 for his contributions. He is the first contributor of this project
Full Changelog: v0.3.0...v0.3.1
FastNN 0.3.0
FastNN 0.3.0
The big change: CUDA is now opt-in. The default build is CPU only and needs no
toolkit, so cargo add fastnn works on any machine. Enable the GPU path with
--features cuda. If nvcc rejects your system compiler, point FASTNN_NVCC_CCBIN
at one it accepts.
Generation and transformers:
- KV cached incremental decoding. Generating a token now costs O(n) attention
instead of O(n^2), and a parity test proves the cached path matches the full
forward exactly. - Sampler with temperature, top-k, top-p and repetition penalty. Beam search
with length penalty and eos handling, usable with any step function. - Full encoder-decoder Transformer: decoder blocks with cross attention, plus
key padding masks in both the encoder and the decoder.
Convolution:
- im2col and col2im run on the GPU, so conv is on-device end to end.
- Dilation, grouped and depthwise conv, Conv1d with a causal mode, and
ConvTranspose1d/2d built on col2im as a first-class op. The transposed conv
is tested against the adjoint identity, not just shapes.
Losses and optimizers:
- New losses: huber, kl_divergence, nll, focal, dice, gaussian_nll,
poisson_nll, cosine_embedding, triplet_margin, margin_ranking, contrastive,
info_nce. A CrossEntropyLoss builder adds label smoothing, class weights,
ignore_index and reduction modes. - New optimizers: RMSprop, Adagrad, Adadelta, RAdam, Lion, Lookahead and an
EMA helper. All carry savable state and each update rule is unit tested
against hand computed values.
Interchange:
- safetensors save and load. Reads F32, F16 and BF16 (widened to f32 with
exact round-to-nearest-even conversions), supports key remapping for foreign
checkpoints, and reports missing and unexpected tensors instead of guessing.
Fixes worth knowing about:
- try_matmul no longer underflows on 1-D operands.
- A plain matrix times a batched tensor keeps its batch dimension.
- CPU matmul is parallel per output row instead of per batch, which makes
CPU training several times faster on transformer shapes.
Tests grew from 90 to about 160 on the CPU plus 16 GPU parity cases, spread
over gradient checks, convergence runs and hand computed reference values.