ollama/kvcache
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
..
cache.go ollamarunner: Preallocate worst case graph at startup 2025-04-08 10:01:28 -07:00
causal.go kvcache: Log batch size if we can't find a slot 2025-05-01 16:26:36 -07:00
causal_test.go ml: structured rope config to allow specifying context len 2025-05-12 13:49:41 -07:00
encoder.go ollamarunner: Preallocate worst case graph at startup 2025-04-08 10:01:28 -07:00
wrapper.go ollamarunner: Preallocate worst case graph at startup 2025-04-08 10:01:28 -07:00