mirror of
https://github.com/huggingface/text-generation-inference.git
synced 2025-04-21 06:42:10 +00:00
fix: update mt0, mamba and grammar tests
This commit is contained in:
parent
c3e358e8b5
commit
add7908f0f
@ -26,13 +26,13 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 259,
|
"id": 259,
|
||||||
"logprob": -0.4716797,
|
"logprob": -0.46948242,
|
||||||
"special": false,
|
"special": false,
|
||||||
"text": " "
|
"text": " "
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 261,
|
"id": 261,
|
||||||
"logprob": -0.044677734,
|
"logprob": -0.15307617,
|
||||||
"special": false,
|
"special": false,
|
||||||
"text": ","
|
"text": ","
|
||||||
},
|
},
|
||||||
@ -56,7 +56,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 35622,
|
"id": 35622,
|
||||||
"logprob": -1.1630859,
|
"logprob": -1.2998047,
|
||||||
"special": false,
|
"special": false,
|
||||||
"text": " cloud"
|
"text": " cloud"
|
||||||
},
|
},
|
||||||
|
@ -22,7 +22,7 @@ async def llama_grammar(llama_grammar_handle):
|
|||||||
return llama_grammar_handle.client
|
return llama_grammar_handle.client
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.release
|
# @pytest.mark.release
|
||||||
@pytest.mark.asyncio
|
@pytest.mark.asyncio
|
||||||
async def test_grammar_response_format_llama_json(llama_grammar, response_snapshot):
|
async def test_grammar_response_format_llama_json(llama_grammar, response_snapshot):
|
||||||
|
|
||||||
@ -63,7 +63,7 @@ async def test_grammar_response_format_llama_json(llama_grammar, response_snapsh
|
|||||||
assert chat_completion == response_snapshot
|
assert chat_completion == response_snapshot
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.release
|
# @pytest.mark.release
|
||||||
@pytest.mark.asyncio
|
@pytest.mark.asyncio
|
||||||
async def test_grammar_response_format_llama_error_if_tools_not_installed(
|
async def test_grammar_response_format_llama_error_if_tools_not_installed(
|
||||||
llama_grammar,
|
llama_grammar,
|
||||||
|
@ -13,7 +13,7 @@ async def fused_kernel_mamba(fused_kernel_mamba_handle):
|
|||||||
return fused_kernel_mamba_handle.client
|
return fused_kernel_mamba_handle.client
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.release
|
# @pytest.mark.release
|
||||||
@pytest.mark.asyncio
|
@pytest.mark.asyncio
|
||||||
async def test_mamba(fused_kernel_mamba, response_snapshot):
|
async def test_mamba(fused_kernel_mamba, response_snapshot):
|
||||||
response = await fused_kernel_mamba.generate(
|
response = await fused_kernel_mamba.generate(
|
||||||
@ -25,7 +25,7 @@ async def test_mamba(fused_kernel_mamba, response_snapshot):
|
|||||||
assert response == response_snapshot
|
assert response == response_snapshot
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.release
|
# @pytest.mark.release
|
||||||
@pytest.mark.asyncio
|
@pytest.mark.asyncio
|
||||||
async def test_mamba_all_params(fused_kernel_mamba, response_snapshot):
|
async def test_mamba_all_params(fused_kernel_mamba, response_snapshot):
|
||||||
response = await fused_kernel_mamba.generate(
|
response = await fused_kernel_mamba.generate(
|
||||||
@ -47,12 +47,12 @@ async def test_mamba_all_params(fused_kernel_mamba, response_snapshot):
|
|||||||
assert response.details.generated_tokens == 10
|
assert response.details.generated_tokens == 10
|
||||||
assert (
|
assert (
|
||||||
response.generated_text
|
response.generated_text
|
||||||
== "blue, red, yellow, \nand blue colors. A number of different color"
|
== "blue, red, yellow, \nand blue colors. A number of the color"
|
||||||
)
|
)
|
||||||
assert response == response_snapshot
|
assert response == response_snapshot
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.release
|
# @pytest.mark.release
|
||||||
@pytest.mark.asyncio
|
@pytest.mark.asyncio
|
||||||
async def test_mamba_load(
|
async def test_mamba_load(
|
||||||
fused_kernel_mamba, generate_load, generous_response_snapshot
|
fused_kernel_mamba, generate_load, generous_response_snapshot
|
||||||
|
@ -13,7 +13,7 @@ async def mt0_base(mt0_base_handle):
|
|||||||
return mt0_base_handle.client
|
return mt0_base_handle.client
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.release
|
# @pytest.mark.release
|
||||||
@pytest.mark.asyncio
|
@pytest.mark.asyncio
|
||||||
async def test_mt0_base(mt0_base, response_snapshot):
|
async def test_mt0_base(mt0_base, response_snapshot):
|
||||||
response = await mt0_base.generate(
|
response = await mt0_base.generate(
|
||||||
@ -28,7 +28,7 @@ async def test_mt0_base(mt0_base, response_snapshot):
|
|||||||
assert response == response_snapshot
|
assert response == response_snapshot
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.release
|
# @pytest.mark.release
|
||||||
@pytest.mark.asyncio
|
@pytest.mark.asyncio
|
||||||
async def test_mt0_base_all_params(mt0_base, response_snapshot):
|
async def test_mt0_base_all_params(mt0_base, response_snapshot):
|
||||||
response = await mt0_base.generate(
|
response = await mt0_base.generate(
|
||||||
@ -51,7 +51,7 @@ async def test_mt0_base_all_params(mt0_base, response_snapshot):
|
|||||||
assert response == response_snapshot
|
assert response == response_snapshot
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.release
|
# @pytest.mark.release
|
||||||
@pytest.mark.asyncio
|
@pytest.mark.asyncio
|
||||||
async def test_mt0_base_load(mt0_base, generate_load, response_snapshot):
|
async def test_mt0_base_load(mt0_base, generate_load, response_snapshot):
|
||||||
responses = await generate_load(
|
responses = await generate_load(
|
||||||
|
Loading…
Reference in New Issue
Block a user