Skip to content

fix: tolerate rope_scaling without factor key#3907

Open
Chessing234 wants to merge 1 commit into
lm-sys:mainfrom
Chessing234:fix/3470-rope-scaling-factor-key
Open

fix: tolerate rope_scaling without factor key#3907
Chessing234 wants to merge 1 commit into
lm-sys:mainfrom
Chessing234:fix/3470-rope-scaling-factor-key

Conversation

@Chessing234

Copy link
Copy Markdown

Summary

  • get_context_length used rope_scaling["factor"], which KeyErrors on Triplex/Phi-3 configs that omit it
  • Use .get("factor", 1) (same for LongChat adapter)

Fixes #3470

Test plan

  • Load a model whose rope_scaling has no factor key

Made with Cursor

Avoids KeyError when loading Triplex/Phi-3 style configs (lm-sys#3470).

Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

【bug】KeyError: 'factor' when use Triplex

1 participant