Fairseq Fix for Python 3.11

Introduction

This repository provides pre-built wheel files for Fairseq, a sequence modeling toolkit written in PyTorch, that are compatible with Python 3.11. Fairseq is widely used for tasks such as translation, summarization, and language modeling. However, the official Fairseq repository does not yet support Python 3.11, and this repository offers a community-provided solution to bridge that gap.

Note: This is not the official Fairseq repository. While it aims to provide compatibility with Python 3.11, it may not include all the latest features or bug fixes from the official Fairseq project. Users should be aware of potential differences or limitations.

Installation

To install the fixed version of Fairseq for Python 3.11, use the following commands based on your operating system:

Linux

pip install git+https://github.com/BF667/fairseq/releases/download/fixed-packages/fairseq-0.12.3-cp311-cp311-linux_x86_64.whl

Windows

pip install git+https://github.com/BF667/fairseq/releases/download/fixed-packages/fairseq-0.12.3-cp311-cp311-win_amd64.whl

These commands will download and install the pre-built wheel files for Fairseq that are compatible with Python 3.11.

Usage

Once installed, you can use Fairseq as you normally would. Below is an example of how to train a model using Fairseq:

fairseq-train /path/to/data \
    --arch transformer \
    --task translation \
    --criterion label_smoothed_cross_entropy \
    --label-smoothing 0.1 \
    --optimizer adam \
    --adam-betas '(0.9, 0.98)' \
    --lr 5e-4 \
    --lr-scheduler inverse_sqrt \
    --warmup-updates 4000 \
    --warmup-init-lr 1e-7 \
    --dropout 0.3 \
    --weight-decay 0.0001 \
    --max-tokens 4096 \
    --batch-size 32 \
    --max-epoch 30 \
    --save-dir /path/to/save

For detailed usage instructions, please refer to the official Fairseq documentation: Fairseq Documentation.

Known Issues or Limitations

  • This repository is a community-provided fix and may not include all the latest features or bug fixes from the official Fairseq repository.
  • Compatibility with all Fairseq features is not guaranteed. Some advanced features might not work as expected.
  • Users should verify the functionality of specific Fairseq components before relying on this version for critical tasks.

Contributing

If you encounter any issues or have suggestions for improvements, please open an issue or submit a pull request on this repository. Contributions are welcome!

License

This repository is likely under the same license as the official Fairseq project, which is the MIT License. Please verify the license directly in the repository if available.

Acknowledgements

Thanks to R-Kentaren for providing this fix for the community.

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support