mirror of
https://github.com/ml-explore/mlx-examples.git
synced 2025-08-29 18:17:07 +08:00
style
This commit is contained in:
parent
4aee86243e
commit
dec2acface
@ -191,6 +191,8 @@ def maybe_quantize_kv_cache(prompt_cache, quantized_kv_start, kv_group_size, kv_
|
|||||||
prompt_cache[i] = prompt_cache[i].to_quantized(
|
prompt_cache[i] = prompt_cache[i].to_quantized(
|
||||||
group_size=kv_group_size, bits=kv_bits
|
group_size=kv_group_size, bits=kv_bits
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
def generate_step(
|
def generate_step(
|
||||||
prompt: mx.array,
|
prompt: mx.array,
|
||||||
model: nn.Module,
|
model: nn.Module,
|
||||||
|
@ -863,7 +863,10 @@ class TestModels(unittest.TestCase):
|
|||||||
sliding_window_pattern=4,
|
sliding_window_pattern=4,
|
||||||
)
|
)
|
||||||
model = cohere2.Model(args)
|
model = cohere2.Model(args)
|
||||||
self.model_test_runner(model, args.model_type, args.vocab_size, args.num_hidden_layers)
|
self.model_test_runner(
|
||||||
|
model, args.model_type, args.vocab_size, args.num_hidden_layers
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
unittest.main()
|
unittest.main()
|
||||||
|
Loading…
Reference in New Issue
Block a user