ollama/model
Bruce MacDonald 51ad65f831 ml: structured rope config to allow specifying context len
This commit refactors the Rotary Position Embedding (RoPE) implementation across the codebase to use a structured configuration approach instead of individual parameters.

Key changes:
- Add new RoPEConfig struct with fields for dimension, type, base frequency, and scaling
- Add RopeType enum to formalize different RoPE implementation variants
- Add YarnConfig struct and related configuration for YaRN (Yet Another RoPE extensioN) context extension
- Update RoPE method signature across all tensor interfaces and implementations
- Refactor all model implementations (llama, gemma2, gemma3, mllama) to use the new configuration structure

This change improves code organization, makes the RoPE configuration more explicit, and provides better support for different RoPE variants and context extension methods.
2025-05-12 13:49:41 -07:00
..
imageproc imageproc mllama refactor (#7537) 2024-12-14 19:50:15 -08:00
input model: Pass input tensor instead of raw data to models 2025-03-20 13:28:13 -07:00
models ml: structured rope config to allow specifying context len 2025-05-12 13:49:41 -07:00
testdata gemma2 impl 2025-03-11 14:35:08 -07:00
model.go feat: add trace log level (#10650) 2025-05-12 11:43:00 -07:00
model_test.go fs: move ml.Config to fs package 2025-04-03 13:12:24 -07:00
process_text.go feat: add trace log level (#10650) 2025-05-12 11:43:00 -07:00
process_text_spm.go feat: add trace log level (#10650) 2025-05-12 11:43:00 -07:00
process_text_spm_test.go fix token type 2025-04-25 16:59:01 -07:00
process_text_test.go fix token type 2025-04-25 16:59:01 -07:00