Skip to content

Commit

Permalink
black
Browse files Browse the repository at this point in the history
  • Loading branch information
ZanSara committed Jan 18, 2024
1 parent 355ab50 commit a5f3a9f
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions integrations/llama_cpp/tests/test_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,18 +95,14 @@ def test_ignores_n_ctx_if_specified_in_model_kwargs(self):
"""
Test that n_ctx is ignored if already specified in model_kwargs.
"""
generator = LlamaCppGenerator(
model="test_model.gguf", n_ctx=512, n_batch=512, model_kwargs={"n_ctx": 1024}
)
generator = LlamaCppGenerator(model="test_model.gguf", n_ctx=512, n_batch=512, model_kwargs={"n_ctx": 1024})
assert generator.model_kwargs["n_ctx"] == 1024

def test_ignores_n_batch_if_specified_in_model_kwargs(self):
"""
Test that n_batch is ignored if already specified in model_kwargs.
"""
generator = LlamaCppGenerator(
model="test_model.gguf", n_ctx=512, n_batch=512, model_kwargs={"n_batch": 1024}
)
generator = LlamaCppGenerator(model="test_model.gguf", n_ctx=512, n_batch=512, model_kwargs={"n_batch": 1024})
assert generator.model_kwargs["n_batch"] == 1024

def test_raises_error_without_warm_up(self):
Expand Down

0 comments on commit a5f3a9f

Please sign in to comment.