fms-acceleration-ilab


Namefms-acceleration-ilab JSON
Version 0.1.0 PyPI version JSON
download
home_pageNone
SummaryFMS Acceleration Plugin for Functionalities Used in Instruct Lab Training
upload_time2024-08-02 05:24:47
maintainerNone
docs_urlNone
authorNone
requires_python~=3.9
licenseApache-2.0
keywords acceleration fms-hf-tuning padding-free
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # FMS Acceleration for Instruct Lab

This library contains plugins to accelerate finetuning with the following optimizations:

1. Padding-Free Flash Attention Computation


## Plugins

Plugin | Description | Depends | Loading | Augmentation | Callbacks
--|--|--|--|--|--
[padding_free](./src/fms_acceleration_ilab/framework_plugin_padding_free.py) | Padding-Free Flash Attention Computation | flash_attn | | ✅ | ✅


## Native Transformers Support from v4.44.0
Transformers natively supports padding-free from v4.44.0 [see here](https://github.com/huggingface/transformers/pull/31629). The padding-free plugin will use the transformers library if compatible, 
otherwise if `transformers < v4.44.0` the plugin will use an internal implementation instead.

## Known Issues

### Currently Only Supports Pre-Tokenized Dataset

The padding-free plugin currently only works with pre-tokenized datasets, this is because it is currently designed to replace 
the data collator from `SFTTrainer` with a custom data collator to manipulate the input to the modified flash attention forward. 

There are some cases, the data collator for SFTTrainer will handle the formatting and tokenization from raw text datasets. The plugin
is currently unable to both handle the original data collation and apply its custom data collator over it as the same time. This issue 
will be addressed in a future commit to support this case. 

In the meantime, the plugin expects the user to provide a pretokenized dataset that
- is formatted with a template for instruct-tuning cases
- is tokenized
- has template labels that are masked to exclude from loss computation
- has eos token appended

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "fms-acceleration-ilab",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "~=3.9",
    "maintainer_email": null,
    "keywords": "acceleration, fms-hf-tuning, padding-free",
    "author": null,
    "author_email": "Fabian Lim <flim@sg.ibm.com>, Aaron Chew <aaron.chew1@ibm.com>",
    "download_url": null,
    "platform": null,
    "description": "# FMS Acceleration for Instruct Lab\n\nThis library contains plugins to accelerate finetuning with the following optimizations:\n\n1. Padding-Free Flash Attention Computation\n\n\n## Plugins\n\nPlugin | Description | Depends | Loading | Augmentation | Callbacks\n--|--|--|--|--|--\n[padding_free](./src/fms_acceleration_ilab/framework_plugin_padding_free.py) | Padding-Free Flash Attention Computation | flash_attn | | \u2705 | \u2705\n\n\n## Native Transformers Support from v4.44.0\nTransformers natively supports padding-free from v4.44.0 [see here](https://github.com/huggingface/transformers/pull/31629). The padding-free plugin will use the transformers library if compatible, \notherwise if `transformers < v4.44.0` the plugin will use an internal implementation instead.\n\n## Known Issues\n\n### Currently Only Supports Pre-Tokenized Dataset\n\nThe padding-free plugin currently only works with pre-tokenized datasets, this is because it is currently designed to replace \nthe data collator from `SFTTrainer` with a custom data collator to manipulate the input to the modified flash attention forward. \n\nThere are some cases, the data collator for SFTTrainer will handle the formatting and tokenization from raw text datasets. The plugin\nis currently unable to both handle the original data collation and apply its custom data collator over it as the same time. This issue \nwill be addressed in a future commit to support this case. \n\nIn the meantime, the plugin expects the user to provide a pretokenized dataset that\n- is formatted with a template for instruct-tuning cases\n- is tokenized\n- has template labels that are masked to exclude from loss computation\n- has eos token appended\n",
    "bugtrack_url": null,
    "license": "Apache-2.0",
    "summary": "FMS Acceleration Plugin for Functionalities Used in Instruct Lab Training",
    "version": "0.1.0",
    "project_urls": null,
    "split_keywords": [
        "acceleration",
        " fms-hf-tuning",
        " padding-free"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a02eff21241f823dff4451e55f595a19f4793f8cf262b60c9bc02ce4863d518b",
                "md5": "5a4f93080a595bb1a9c7b3ff1388eb37",
                "sha256": "376f84b064990cf647863c29cb3037f0a47cf4a2a9e5cecb954110a33ccae25c"
            },
            "downloads": -1,
            "filename": "fms_acceleration_ilab-0.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "5a4f93080a595bb1a9c7b3ff1388eb37",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "~=3.9",
            "size": 8700,
            "upload_time": "2024-08-02T05:24:47",
            "upload_time_iso_8601": "2024-08-02T05:24:47.721870Z",
            "url": "https://files.pythonhosted.org/packages/a0/2e/ff21241f823dff4451e55f595a19f4793f8cf262b60c9bc02ce4863d518b/fms_acceleration_ilab-0.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-08-02 05:24:47",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "fms-acceleration-ilab"
}
        
Elapsed time: 0.56706s