mirror of
https://github.com/huggingface/text-generation-inference.git
synced 2025-09-11 04:14:52 +00:00
oupsi
This commit is contained in:
parent
70ada578b9
commit
0d9ec75f27
@ -16,6 +16,7 @@ from transformers.models.auto import modeling_auto
|
||||
from huggingface_hub import hf_hub_download, HfApi
|
||||
from typing import Optional, List, Dict
|
||||
from pathlib import Path
|
||||
import transformers
|
||||
|
||||
from text_generation_server.utils.speculate import get_speculate, set_speculate
|
||||
from text_generation_server.models.model import Model
|
||||
@ -384,8 +385,10 @@ def get_model(
|
||||
transformers_causal_lm_class = CausalLM
|
||||
|
||||
# Fast transformers path
|
||||
transformers_model_class = modeling_auto.MODEL_FOR_CAUSAL_LM_MAPPING_NAMES.get(
|
||||
model_type, None
|
||||
transformers_model_class = getattr(
|
||||
transformers,
|
||||
modeling_auto.MODEL_FOR_CAUSAL_LM_MAPPING_NAMES.get(model_type, ""),
|
||||
None,
|
||||
)
|
||||
if (
|
||||
FLASH_TRANSFORMERS_BACKEND
|
||||
|
Loading…
Reference in New Issue
Block a user