mirror of
https://github.com/huggingface/text-generation-inference.git
synced 2025-09-11 12:24:53 +00:00
fix: update tests and snaps
This commit is contained in:
parent
c7caac47f8
commit
3ec57acac1
@ -0,0 +1,24 @@
|
|||||||
|
{
|
||||||
|
"choices": [
|
||||||
|
{
|
||||||
|
"finish_reason": "length",
|
||||||
|
"index": 0,
|
||||||
|
"logprobs": null,
|
||||||
|
"message": {
|
||||||
|
"content": "As an up-to-date news station, our team has access to the latest information on weather conditions in Brooklyn, New York. Here is what we have learned so far:\n\n- Located in New York City, Brooklyn has a history of harsh weather patterns, especially in winter. The city's cold penchant makes it a popular winter destination, and meteorologists predict \"bomb cyclone\" conditions in the year 2021. - Due to",
|
||||||
|
"name": null,
|
||||||
|
"role": "assistant"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"created": 1708623190,
|
||||||
|
"id": "",
|
||||||
|
"model": "TinyLlama/TinyLlama-1.1B-Chat-v1.0",
|
||||||
|
"object": "text_completion",
|
||||||
|
"system_fingerprint": "1.4.2-native",
|
||||||
|
"usage": {
|
||||||
|
"completion_tokens": 100,
|
||||||
|
"prompt_tokens": 60,
|
||||||
|
"total_tokens": 160
|
||||||
|
}
|
||||||
|
}
|
@ -1,24 +0,0 @@
|
|||||||
{
|
|
||||||
"choices": [
|
|
||||||
{
|
|
||||||
"finish_reason": "length",
|
|
||||||
"index": 0,
|
|
||||||
"logprobs": null,
|
|
||||||
"message": {
|
|
||||||
"content": "As for the weather in Brooklyn, New York, it can vary depending on the location within the borough. According to climatereporter.com, the average temperature in August is 73 degrees Fahrenheit (23 degrees Celsius), while the humidity is 62%. In the winter (December to February), the temperature averages between 20 and 45 degrees Fahrenheit (6 to 8 degrees Celsius), with significant",
|
|
||||||
"name": null,
|
|
||||||
"role": "assistant"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"created": 1708103426,
|
|
||||||
"id": "",
|
|
||||||
"model": "TinyLlama/TinyLlama-1.1B-Chat-v1.0",
|
|
||||||
"object": "text_completion",
|
|
||||||
"system_fingerprint": "1.4.0-native",
|
|
||||||
"usage": {
|
|
||||||
"completion_tokens": 100,
|
|
||||||
"prompt_tokens": 82,
|
|
||||||
"total_tokens": 182
|
|
||||||
}
|
|
||||||
}
|
|
@ -11,14 +11,14 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"created": 1708103426,
|
"created": 1708623212,
|
||||||
"id": "",
|
"id": "",
|
||||||
"model": "TinyLlama/TinyLlama-1.1B-Chat-v1.0",
|
"model": "TinyLlama/TinyLlama-1.1B-Chat-v1.0",
|
||||||
"object": "text_completion",
|
"object": "text_completion",
|
||||||
"system_fingerprint": "1.4.0-native",
|
"system_fingerprint": "1.4.2-native",
|
||||||
"usage": {
|
"usage": {
|
||||||
"completion_tokens": 33,
|
"completion_tokens": 33,
|
||||||
"prompt_tokens": 321,
|
"prompt_tokens": 318,
|
||||||
"total_tokens": 354
|
"total_tokens": 351
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -93,7 +93,7 @@ async def test_flash_llama_grammar_no_tools_regex(
|
|||||||
|
|
||||||
assert (
|
assert (
|
||||||
response.choices[0].message.content
|
response.choices[0].message.content
|
||||||
== "As for the weather in Brooklyn, New York, it can vary depending on the location within the borough. According to climatereporter.com, the average temperature in August is 73 degrees Fahrenheit (23 degrees Celsius), while the humidity is 62%. In the winter (December to February), the temperature averages between 20 and 45 degrees Fahrenheit (6 to 8 degrees Celsius), with significant"
|
== 'As an up-to-date news station, our team has access to the latest information on weather conditions in Brooklyn, New York. Here is what we have learned so far:\n\n- Located in New York City, Brooklyn has a history of harsh weather patterns, especially in winter. The city\'s cold penchant makes it a popular winter destination, and meteorologists predict "bomb cyclone" conditions in the year 2021. - Due to'
|
||||||
)
|
)
|
||||||
assert response == response_snapshot
|
assert response == response_snapshot
|
||||||
|
|
||||||
@ -107,6 +107,7 @@ async def test_flash_llama_grammar_tools_regex(
|
|||||||
max_tokens=100,
|
max_tokens=100,
|
||||||
seed=0,
|
seed=0,
|
||||||
tools=tools,
|
tools=tools,
|
||||||
|
presence_penalty=-1.1,
|
||||||
messages=[
|
messages=[
|
||||||
{
|
{
|
||||||
"role": "system",
|
"role": "system",
|
||||||
|
Loading…
Reference in New Issue
Block a user