LlamaRotaryEmbedding extended with linear scaling. Credits to the Reddit user /u/kaiokendev
| 171 | |
| 172 | |
| 173 | class LlamaLinearScalingRotaryEmbedding(LlamaRotaryEmbedding): |
| 174 | """LlamaRotaryEmbedding extended with linear scaling. Credits to the Reddit user /u/kaiokendev""" |
| 175 | |
| 176 | def __init__(self, *args, **kwargs): |
| 177 | logger.warning_once( |
| 178 | "`LlamaLinearScalingRotaryEmbedding` is deprecated an will be removed in v4.45. Please use " |
| 179 | "`LlamaRotaryEmbedding`, which now also does linear scaling (simply pass the model config to __init__)." |
| 180 | ) |
| 181 | kwargs["rope_type"] = "linear" |
| 182 | super().__init__(*args, **kwargs) |
| 183 | |
| 184 | |
| 185 | class LlamaDynamicNTKScalingRotaryEmbedding(LlamaRotaryEmbedding): |
nothing calls this directly
no outgoing calls
no test coverage detected