fix: update client exports and adjust after rebase

This commit is contained in:
drbh 2024-07-19 17:18:33 +00:00
parent 80ab61c013
commit 7e810e7628
3 changed files with 19 additions and 1 deletions

View File

@ -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",
]

View File

@ -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

View File

@ -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__(