Open
Description
🚀 The feature, motivation and pitch
To generalize export_llama
better to transformers as export_llm
, the following directories and files in examples/models/llama
will be moved to extension/llm
:
- examples/models/llama/config
- examples/models/llama/source_transformation
- examples/models/llama/tests
- attention.py -> Will go into a new
attention
directory - export_llama_hydra.py -> this will be renamed to
export_llm.py
and will be the main entrypoint to the new API - export_llama_lib.py -> this will be renamed to
export_llm_lib.py
- fairseq2.py
- hf_download.py
- llama_transformer.py -> this will be renamed to
transformer.py
- model.py -> this will have
Llama2Model
renamed toTransformerModel
. Also not a big fan of the naming of this file, open to take this opportunity to rename toeager.py
or something like that to its intent better, which is to instantiate the model.- We could remove Llama-specific components from the version in
extension/llm
such as Fairseq2 and haveLlama2Model
inherit from it
- We could remove Llama-specific components from the version in
- model_args.py
- norm.py
- rope.py
- static_attention.py -> Will go into a new
attention
directory
Key notes:
- export_llama.py stays put,
export_llama
will still exist to preserve BC, especially internally- export_llama_args.py then also stays put, supporting the legacy CLI
- export_llama_hydra.py will be the new
export_llm
powered by Hydra, and it will be inextension/llm
. Note that this means that theexport_llm
API will not support the legacy CLI
- Lots of internal callsites for functions in
export_llama_lib
such as_prepare_for_llama_export
and_export_llama
. These will need to all be renamed and refactored.
Alternatives
No response
Additional context
No response
RFC (Optional)
No response
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
To triage