model: add qwen3-next architecture (#14051)

This commit is contained in:
Jeffrey Morgan
2026-02-03 23:27:21 -08:00
committed by GitHub
parent ee25219edd
commit 77eb2ca619
29 changed files with 3614 additions and 12 deletions

View File

@@ -124,8 +124,17 @@ func (c *InputCache) LoadCacheSlot(prompt []*input.Input, cachePrompt bool) (*In
}
if c.cache != nil {
if numPast > 0 && !c.cache.CanResume(slot.Id, numPast) {
numPast = 0
if numPast > 0 {
// Recurrent caches use checkpoints to pick a safe resume position.
if cc, ok := c.cache.(kvcache.CheckpointCache); ok {
if restored, ok := cc.PrepareRestore(slot.Id, numPast); ok {
numPast = restored
} else {
numPast = 0
}
} else if !c.cache.CanResume(slot.Id, numPast) {
numPast = 0
}
}
err = c.cache.Remove(slot.Id, numPast, math.MaxInt32)