mirror of
https://github.com/huggingface/text-generation-inference.git
synced 2025-04-22 15:32:08 +00:00
49 lines
1.3 KiB
Python
49 lines
1.3 KiB
Python
# Copyright (C) 2024 Habana Labs, Ltd. an Intel Company.
|
|
|
|
import text_generation_server.habana_quantization_env
|
|
from text_generation_server.utils.convert import convert_file, convert_files
|
|
from text_generation_server.utils.dist import initialize_torch_distributed
|
|
from text_generation_server.utils.weights import Weights
|
|
from text_generation_server.utils.peft import download_and_unload_peft
|
|
from text_generation_server.utils.hub import (
|
|
weight_files,
|
|
weight_hub_files,
|
|
download_weights,
|
|
EntryNotFoundError,
|
|
LocalEntryNotFoundError,
|
|
RevisionNotFoundError,
|
|
)
|
|
from text_generation_server.utils.tokens import (
|
|
NextTokenChooser,
|
|
HeterogeneousNextTokenChooser,
|
|
StoppingCriteria,
|
|
StopSequenceCriteria,
|
|
FinishReason,
|
|
Sampling,
|
|
Greedy,
|
|
make_tokenizer_optional,
|
|
is_tokenizer_transparent,
|
|
pad_next_token_chooser_parameters,
|
|
)
|
|
|
|
__all__ = [
|
|
"convert_file",
|
|
"convert_files",
|
|
"initialize_torch_distributed",
|
|
"weight_files",
|
|
"weight_hub_files",
|
|
"download_weights",
|
|
"download_and_unload_peft",
|
|
"EntryNotFoundError",
|
|
"HeterogeneousNextTokenChooser",
|
|
"LocalEntryNotFoundError",
|
|
"RevisionNotFoundError",
|
|
"Greedy",
|
|
"NextTokenChooser",
|
|
"Sampling",
|
|
"StoppingCriteria",
|
|
"StopSequenceCriteria",
|
|
"FinishReason",
|
|
"Weights",
|
|
]
|