microsoft / microsoft/KBLaM

ImportError: cannot import name 'LlamaDynamicNTKScalingRotaryEmbedding' from 'transformers.models.llama.modeling_llama'

Open
#80 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Jupyter Notebook
Stars
1.5k
Forks
125
Avg merge
22d 8m
Merged PRs (30d)
1

Description

Traceback (most recent call last):
File "/home/ubisec/swh/codes/KBLaM/experiments/train.py", line 36, in
from kblam.models.llama3_model import KblamLlamaForCausalLM
File "/home/ubisec/swh/codes/KBLaM/src/kblam/models/llama3_model.py", line 46, in
from transformers.models.llama.modeling_llama import (
ImportError: cannot import name 'LlamaDynamicNTKScalingRotaryEmbedding' from 'transformers.models.llama.modeling_llama' (/home/ubisec/miniconda3/envs/swh-kblam/lib/python3.10/site-packages/transformers/models/llama/modeling_llama.py)

Previously, it could run training successfully, but now it cannot run in the same environment.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the import block in src/kblam/models/llama3_model.py and reproduce the failure from experiments/train.py. Check the installed Transformers version and whether the referenced Llama symbol is available in that environment. Done means the training entry point no longer fails with this ImportError.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
machine-learning
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.