-
-
Notifications
You must be signed in to change notification settings - Fork 910
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feat: Add landmark attention #169
Conversation
Testing via https://github.com/epfml/landmark-attention/blob/main/llama/run_test.py n=1k
n=5k
n=8k
n=10k
n=12k
n=14k
n=18k
n=20k
n=25k
n=38k
n=45k
n=50k
n=60k
n=75k
Thanks to AutoMeta for compute for testing. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔥
This feature should allow longer context. The test above uses the author's delta weights to confirm feature parity. |
elif cfg.is_llama_derived_model and cfg.landmark_attention: | ||
from axolotl.monkeypatch.llama_landmark_attn import ( # pylint: disable=redefined-outer-name # noqa: F811 | ||
MEM_TOKEN, | ||
LlamaForCausalLM, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reassigning this here inside the function causes this error:
ERROR:root:local variable 'LlamaForCausalLM' referenced before assignment
Traceback (most recent call last):
File "/workspace/axolotl/src/axolotl/utils/models.py", line 214, in load_model
model = LlamaForCausalLM.from_pretrained(
UnboundLocalError: local variable 'LlamaForCausalLM' referenced before assignment
^CTraceback (most recent call last):
File "/workspace/axolotl/src/axolotl/utils/models.py", line 214, in load_model
model = LlamaForCausalLM.from_pretrained(
UnboundLocalError: local variable 'LlamaForCausalLM' referenced before assignment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm, weirdly I didn't get this error.
Second, the new PR should fix this import issue. But, it hasn't been tested.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I need to go afk for now, so I'll test the PR when I get back since it seem like a big bug.
Feat: Add landmark attention
Feat: Add landmark attention
Closes #109
NOTE: Only Llama!