Skip to main content

FJFormer

PyPI version Documentation Status License

FJFormer is a powerful and flexible JAX-based package designed to accelerate and simplify machine learning and deep learning workflows. It provides a comprehensive suite of tools and utilities for efficient model development, training, and deployment.

Features

1. JAX Sharding Utils

Leverage the power of distributed computing and model parallelism with our advanced JAX sharding utilities. These tools enable efficient splitting and management of large models across multiple devices, enhancing performance and enabling the training of larger models.

2. Custom Pallas / Triton Operation Kernels

Boost your model's performance with our optimized kernels for specific operations. These custom-built kernels, implemented using Pallas and Triton, provide significant speedups for common bottleneck operations in deep learning models.

3. Pre-built Optimizers

Jump-start your training with our collection of ready-to-use, efficiently implemented optimization algorithms:

  • AdamW: An Adam variant with decoupled weight decay.
  • Adafactor: Memory-efficient adaptive optimization algorithm.
  • Lion: Recently proposed optimizer combining the benefits of momentum and adaptive methods.
  • RMSprop: Adaptive learning rate optimization algorithm.

4. Utility Functions

A rich set of utility functions to streamline your workflow, including:

  • Various loss functions (e.g., cross-entropy)
  • Metrics calculation
  • Data preprocessing tools

5. ImplicitArray

Our innovative ImplicitArray class provides a powerful abstraction for representing and manipulating large arrays without instantiation. Benefits include:

  • Lazy evaluation for memory efficiency
  • Optimized array operations in JAX
  • Seamless integration with other FJFormer components

6. Custom Dtypes

  • Implement 4-bit quantization (NF4) effortlessly using our ArrayNF4 class, built on top of ImplicitArray. Reduce model size and increase inference speed without significant loss in accuracy (from QLoRA paper).

  • Similar to ArrayNF4, our Array8Lt implementation offers 8-bit quantization via ImplicitArray, providing a balance between model compression and precision.

7. LoRA (Low-Rank Adaptation)

Efficiently fine-tune large language models with our LoRA implementation, leveraging ImplicitArray for optimal performance and memory usage.

8. JAX and Array Manipulation

A comprehensive set of tools and utilities for efficient array operations and manipulations in JAX, designed to complement and extend JAX's native capabilities.

9. Checkpoint Managers

Robust utilities for managing model checkpoints, including:

  • Efficient saving and loading of model states
  • Version control for checkpoints
  • Integration with distributed training workflows

Installation

You can install FJFormer using pip:

pip install fjformer

For the latest development version, you can install directly from GitHub:

pip install git+https://github.com/yourusername/fjformer.git

Documentation

For detailed documentation, including API references, please visit:

https://fjformer.readthedocs.org

License

FJFormer is released under the Apache License 2.0. See the LICENSE file for more details.

Metadata

Release files for fjformer 0.0.91

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for fjformer 0.0.91
File Size Uploaded
fjformer-0.0.91.tar.gz 122.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for fjformer 0.0.91
File Interpreter ABI Platform
fjformer-0.0.91-py3-none-any.whl Python 3 none any Details

Total release size: 294.7 kB

Release files / fjformer-0.0.91.tar.gz

Download URL fjformer-0.0.91.tar.gz
Size 122.8 kB
Tags Source
SHA-256 checksum
How to use checksums
76c6f48ddab67dc98a23c3fbd96a5135e01f6cbd04514682a756cb97c56bf21d
BLAKE2b-256 checksum
How to use checksums
5ece1219bb62c1dfb29197497d7dcf04f2c9da7d58c712f651dfab342a03aa9e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.4 CPython/3.10.12 Linux/6.8.0-48-generic

Release files / fjformer-0.0.91-py3-none-any.whl

Download URL fjformer-0.0.91-py3-none-any.whl
Size 171.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
725012e850cd899ee828a2ebea9d85c88106151b10810cbee1d02b8ff7314d74
BLAKE2b-256 checksum
How to use checksums
bad6b2069150c0ddc8891f1bb4ad69d076714de08ad35f6ae17df90ae7ff7562
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.4 CPython/3.10.12 Linux/6.8.0-48-generic

Release history Release notifications | RSS feed

This release

0.0.91 This release

2 release files

0.0.90

2 release files

0.0.88

2 release files

0.0.87

2 release files

0.0.83

2 release files

0.0.81

2 release files

0.0.80

2 release files

0.0.79

2 release files

0.0.78

2 release files

0.0.77

2 release files

0.0.76

2 release files

0.0.75

2 release files

0.0.73

2 release files

0.0.72

2 release files

0.0.71

2 release files

0.0.70

2 release files

0.0.69

2 release files

0.0.68

2 release files

0.0.67

2 release files

0.0.66

2 release files

0.0.65

2 release files

0.0.64

2 release files

0.0.63

2 release files

0.0.62

2 release files

0.0.61

2 release files

0.0.60

2 release files

0.0.58

2 release files

0.0.57

2 release files

0.0.56

2 release files

0.0.55

2 release files

0.0.54

2 release files

0.0.50

2 release files

0.0.46

2 release files

0.0.45

2 release files

0.0.42

2 release files

0.0.41

2 release files

0.0.40

2 release files

0.0.35

2 release files

0.0.32

2 release files

0.0.31

2 release files

0.0.29

2 release files

0.0.28

2 release files

0.0.27

2 release files

0.0.26

2 release files

0.0.25

2 release files

0.0.24

2 release files

0.0.20

2 release files

0.0.19

2 release files

0.0.16

2 release files

0.0.15

2 release files

0.0.14

1 release file

0.0.13

2 release files

0.0.12

2 release files

0.0.11

2 release files

0.0.10

2 release files

0.0.9

2 release files

0.0.8

2 release files

0.0.7

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

0.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page