Download models/__init__.py from pgup/omg_o3: direct link, hf CLI and curl.
- Browser
- Download file 1.02 kB
-
https://huggingface.co/pgup/omg_o3/resolve/main/models/__init__.py
- Command line
-
hf download hf://pgup/omg_o3/models/__init__.py
-
curl -L -o __init__.py https://huggingface.co/pgup/omg_o3/resolve/main/models/__init__.py
1.02 kB
| from torchtune.models import convert_weights | |
| from models.tokenizer import a2a_tokenizer | |
| from models.mmllama3 import lora_mmllama3_8b, mmllama3_8b, imagebind_huge | |
| __all__ = [ | |
| "a2a_tokenizer", | |
| "lora_mmllama3_8b", | |
| "mmllama3_8b", | |
| "imagebind_huge", | |
| ] | |
| _BASE_TRAINABLE = [ | |
| "tok_embeddings.proj_to_llama.0.weight", | |
| "tok_embeddings.proj_to_llama.0.bias", | |
| "tok_embeddings.proj_to_llama.2.weight", | |
| "tok_embeddings.proj_to_llama.2.bias", | |
| "tok_embeddings.proj_to_llama.3.weight", | |
| "tok_embeddings.proj_to_llama.3.bias", | |
| "output.proj_from_llama.0.weight", | |
| "output.proj_from_llama.0.bias", | |
| "output.proj_from_llama.2.weight", | |
| "output.proj_from_llama.2.bias", | |
| "output.proj_from_llama.3.weight", | |
| "output.proj_from_llama.3.bias", | |
| ] | |
| def add_proj_convert_weights(): | |
| # extend _FROM_META torchtune -> meta mapping with new parameter names | |
| # allow existing ckpt-save code to work without changes | |
| convert_weights._FROM_META.update({a: a for a in _BASE_TRAINABLE}) | |