mirror of
https://github.com/huggingface/text-generation-inference.git
synced 2025-09-12 04:44:52 +00:00
fix: update client exports and adjust after rebase
This commit is contained in:
parent
80ab61c013
commit
7e810e7628
@ -12,9 +12,22 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
|
from text_generation.client import Client, AsyncClient
|
||||||
|
from text_generation.inference_api import InferenceAPIClient, InferenceAPIAsyncClient
|
||||||
|
|
||||||
|
|
||||||
__version__ = "0.7.0"
|
__version__ = "0.7.0"
|
||||||
|
|
||||||
DEPRECATION_WARNING = (
|
DEPRECATION_WARNING = (
|
||||||
"`text_generation` clients are deprecated and will be removed in the near future. "
|
"`text_generation` clients are deprecated and will be removed in the near future. "
|
||||||
"Please use the `InferenceClient` from the `huggingface_hub` package instead."
|
"Please use the `InferenceClient` from the `huggingface_hub` package instead."
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
__all__ = [
|
||||||
|
"Client",
|
||||||
|
"AsyncClient",
|
||||||
|
"InferenceAPIClient",
|
||||||
|
"InferenceAPIAsyncClient",
|
||||||
|
"DEPRECATION_WARNING",
|
||||||
|
]
|
||||||
|
@ -2,7 +2,6 @@ import os
|
|||||||
import math
|
import math
|
||||||
import torch
|
import torch
|
||||||
from torch import nn
|
from torch import nn
|
||||||
from loguru import logger
|
|
||||||
|
|
||||||
# Inverse dim formula to find dim based on number of rotations
|
# Inverse dim formula to find dim based on number of rotations
|
||||||
import math
|
import math
|
||||||
|
@ -39,6 +39,12 @@ from torch import nn
|
|||||||
from transformers.activations import ACT2FN
|
from transformers.activations import ACT2FN
|
||||||
from transformers.configuration_utils import PretrainedConfig
|
from transformers.configuration_utils import PretrainedConfig
|
||||||
|
|
||||||
|
if SYSTEM == "rocm":
|
||||||
|
try:
|
||||||
|
from vllm import _custom_C
|
||||||
|
except Exception as e:
|
||||||
|
raise ImportError(f"Could not load `vllm._custom_C`. Full error: {e}")
|
||||||
|
|
||||||
|
|
||||||
class DeepseekV2Config(PretrainedConfig):
|
class DeepseekV2Config(PretrainedConfig):
|
||||||
def __init__(
|
def __init__(
|
||||||
|
Loading…
Reference in New Issue
Block a user