model : add grok-2 support (#782)

Co-authored-by: firecoperana <firecoperana>
This commit is contained in:
firecoperana
2025-09-23 09:31:01 -05:00
committed by GitHub
parent 18f04350e9
commit 8cd2d7ccd7
10 changed files with 271 additions and 82 deletions

View File

@@ -116,9 +116,9 @@ struct gpt_params {
float rope_freq_base = 0.0f; // RoPE base frequency
float rope_freq_scale = 0.0f; // RoPE frequency scaling factor
float yarn_ext_factor = -1.0f; // YaRN extrapolation mix factor
float yarn_attn_factor = 1.0f; // YaRN magnitude scaling factor
float yarn_beta_fast = 32.0f; // YaRN low correction dim
float yarn_beta_slow = 1.0f; // YaRN high correction dim
float yarn_attn_factor = -1.0f; // YaRN magnitude scaling factor
float yarn_beta_fast = -1.0f; // YaRN low correction dim
float yarn_beta_slow = -1.0f; // YaRN high correction dim
int32_t yarn_orig_ctx = 0; // YaRN original context length
float defrag_thold = -1.0f; // KV cache defragmentation threshold