Skip to content

Commit 4dc73ec

Browse files
test: align QDC tests to the precision API
1 parent cb4ada7 commit 4dc73ec

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

tests/conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ def geniex_session():
117117
@pytest.fixture(scope='session')
118118
def llama_cpp_llm_paths(geniex_session):
119119
try:
120-
return _mm.ensure_cached(LLAMA_CPP_LLM_MODEL, quant=LLAMA_CPP_LLM_QUANT, hub='hf')
120+
return _mm.ensure_cached(LLAMA_CPP_LLM_MODEL, precision=LLAMA_CPP_LLM_QUANT, hub='hf')
121121
except geniex.GenieXError as e:
122122
pytest.skip(f'could not pull {LLAMA_CPP_LLM_MODEL}: {e}')
123123

tests/plugins/llama_cpp/test_llama_cpp_llm.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
def test_generate_blocking(llama_cpp_llm_paths, device_map):
3535
with geniex.AutoModelForCausalLM.from_pretrained(
3636
LLAMA_CPP_LLM_MODEL,
37-
quant=LLAMA_CPP_LLM_QUANT,
37+
precision=LLAMA_CPP_LLM_QUANT,
3838
device_map=device_map,
3939
) as llm:
4040
assert isinstance(llm, geniex.GenieXLLM)
@@ -48,7 +48,7 @@ def test_generate_blocking(llama_cpp_llm_paths, device_map):
4848
def test_generate_stream(llama_cpp_llm_paths, device_map):
4949
with geniex.AutoModelForCausalLM.from_pretrained(
5050
LLAMA_CPP_LLM_MODEL,
51-
quant=LLAMA_CPP_LLM_QUANT,
51+
precision=LLAMA_CPP_LLM_QUANT,
5252
device_map=device_map,
5353
) as llm:
5454
streamer = llm.generate('Say hi.', max_new_tokens=8, temperature=0.0, seed=42, stream=True)
@@ -70,7 +70,7 @@ def test_quality_keywords(llama_cpp_llm_paths, device_map, prompt, expected):
7070
# in completion mode and the keyword only appears by sampler luck.
7171
with geniex.AutoModelForCausalLM.from_pretrained(
7272
LLAMA_CPP_LLM_MODEL,
73-
quant=LLAMA_CPP_LLM_QUANT,
73+
precision=LLAMA_CPP_LLM_QUANT,
7474
device_map=device_map,
7575
) as llm:
7676
formatted = llm.tokenizer.apply_chat_template(

0 commit comments

Comments
 (0)