Update README.md
Browse files
README.md
CHANGED
|
@@ -2,4 +2,74 @@
|
|
| 2 |
license: mit
|
| 3 |
tags:
|
| 4 |
- code
|
| 5 |
-
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2 |
license: mit
|
| 3 |
tags:
|
| 4 |
- code
|
| 5 |
+
---
|
| 6 |
+
|
| 7 |
+
# Fairseq Fix for Python 3.11
|
| 8 |
+
|
| 9 |
+
## Introduction
|
| 10 |
+
|
| 11 |
+
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.
|
| 12 |
+
|
| 13 |
+
**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.
|
| 14 |
+
|
| 15 |
+
## Installation
|
| 16 |
+
|
| 17 |
+
To install the fixed version of Fairseq for Python 3.11, use the following commands based on your operating system:
|
| 18 |
+
|
| 19 |
+
### Linux
|
| 20 |
+
|
| 21 |
+
```bash
|
| 22 |
+
pip install https://huggingface.co/R-Kentaren/Fairseq/resolve/main/fairseq-linux_x86_64.whl
|
| 23 |
+
```
|
| 24 |
+
|
| 25 |
+
### Windows
|
| 26 |
+
|
| 27 |
+
```bash
|
| 28 |
+
pip install https://huggingface.co/R-Kentaren/Fairseq/resolve/main/fairseq-win_amd64.whl
|
| 29 |
+
```
|
| 30 |
+
|
| 31 |
+
These commands will download and install the pre-built wheel files for Fairseq that are compatible with Python 3.11.
|
| 32 |
+
|
| 33 |
+
## Usage
|
| 34 |
+
|
| 35 |
+
Once installed, you can use Fairseq as you normally would. Below is an example of how to train a model using Fairseq:
|
| 36 |
+
|
| 37 |
+
```bash
|
| 38 |
+
fairseq-train /path/to/data \
|
| 39 |
+
--arch transformer \
|
| 40 |
+
--task translation \
|
| 41 |
+
--criterion label_smoothed_cross_entropy \
|
| 42 |
+
--label-smoothing 0.1 \
|
| 43 |
+
--optimizer adam \
|
| 44 |
+
--adam-betas '(0.9, 0.98)' \
|
| 45 |
+
--lr 5e-4 \
|
| 46 |
+
--lr-scheduler inverse_sqrt \
|
| 47 |
+
--warmup-updates 4000 \
|
| 48 |
+
--warmup-init-lr 1e-7 \
|
| 49 |
+
--dropout 0.3 \
|
| 50 |
+
--weight-decay 0.0001 \
|
| 51 |
+
--max-tokens 4096 \
|
| 52 |
+
--batch-size 32 \
|
| 53 |
+
--max-epoch 30 \
|
| 54 |
+
--save-dir /path/to/save
|
| 55 |
+
```
|
| 56 |
+
|
| 57 |
+
For detailed usage instructions, please refer to the official Fairseq documentation: [Fairseq Documentation](https://fairseq.readthedocs.io/en/latest/).
|
| 58 |
+
|
| 59 |
+
## Known Issues or Limitations
|
| 60 |
+
|
| 61 |
+
- This repository is a community-provided fix and may not include all the latest features or bug fixes from the official Fairseq repository.
|
| 62 |
+
- Compatibility with all Fairseq features is not guaranteed. Some advanced features might not work as expected.
|
| 63 |
+
- Users should verify the functionality of specific Fairseq components before relying on this version for critical tasks.
|
| 64 |
+
|
| 65 |
+
## Contributing
|
| 66 |
+
|
| 67 |
+
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!
|
| 68 |
+
|
| 69 |
+
## License
|
| 70 |
+
|
| 71 |
+
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.
|
| 72 |
+
|
| 73 |
+
## Acknowledgements
|
| 74 |
+
|
| 75 |
+
Thanks to R-Kentaren for providing this fix for the community.
|