We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 721a205 commit 0b8be89Copy full SHA for 0b8be89
fla/models/utils.py
@@ -377,7 +377,8 @@ def from_legacy_cache(
377
cache = cls(seen_tokens=seen_tokens, **kwargs)
378
if isinstance(past_key_values, (list, tuple)):
379
for i, st in enumerate(past_key_values):
380
- cache.append_new_layers(i)
+ while len(cache.layers) <= i:
381
+ cache.layers.append(cache.layer_class_to_replicate())
382
cache.layers[i].state = dict(st)
383
return cache
384
0 commit comments