mirror of
https://github.com/huggingface/text-generation-inference.git
synced 2025-04-21 14:52:20 +00:00
* wip * rollback * refactor to use prefix/postfix namming + fix all_input_ids_tensor * maybe patching vlms? * fix filter and concat * wip, no filter, no concat * current * add prepare_for_prefill * working * load tested * re-create slots * re-create slots * fix slot_filtering_indices * feedback loop * remove log * fix benchmarker * fix vlm and seq2seq * rename to cache and input lengths * fix prefill logprobs * fix launcher * fix logprobs? * idk at this point * max input length * omfg * remove debugging lines * fix tests * fix mllama * fix cargo tests * remove support chunking for paged * Fixing non blocked attentions * Fixing dtype + AMD, Ipex targets. * lint fix. * rename * Fix prefix_caching variable, remove defaults in server (confusing a lot of the times). * Add simple resolution when user specifies ATTENTION=paged. * Put back non default simple tests. * Fix env name --------- Co-authored-by: Nicolas Patry <patry.nicolas@protonmail.com>
24 lines
537 B
Python
24 lines
537 B
Python
import pytest
|
|
import os
|
|
from text_generation_server.pb import generate_pb2
|
|
|
|
os.environ["PREFIX_CACHING"] = "1"
|
|
os.environ["ATTENTION"] = "flashinfer"
|
|
|
|
|
|
@pytest.fixture
|
|
def default_pb_parameters():
|
|
return generate_pb2.NextTokenChooserParameters(
|
|
temperature=1.0,
|
|
repetition_penalty=1.0,
|
|
top_k=0,
|
|
top_p=1.0,
|
|
typical_p=1.0,
|
|
do_sample=False,
|
|
)
|
|
|
|
|
|
@pytest.fixture
|
|
def default_pb_stop_parameters():
|
|
return generate_pb2.StoppingCriteriaParameters(stop_sequences=[], max_new_tokens=10)
|