hjxdl 0.0.16__py3-none-any.whl → 0.0.17__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
hdl/_version.py CHANGED
@@ -12,5 +12,5 @@ __version__: str
12
12
  __version_tuple__: VERSION_TUPLE
13
13
  version_tuple: VERSION_TUPLE
14
14
 
15
- __version__ = version = '0.0.16'
16
- __version_tuple__ = version_tuple = (0, 0, 16)
15
+ __version__ = version = '0.0.17'
16
+ __version_tuple__ = version_tuple = (0, 0, 17)
hdl/utils/llm/chat.py CHANGED
@@ -18,6 +18,20 @@ class GGUF_M(Llama):
18
18
  *args,
19
19
  **kwargs
20
20
  ):
21
+ """Initialize the model with the specified parameters.
22
+
23
+ Args:
24
+ model_path (str): The path to the model.
25
+ device (str, optional): The device to use, either 'gpu' or 'cpu'. Defaults to 'gpu'.
26
+ generation_kwargs (dict, optional): Additional generation keyword arguments. Defaults to {}.
27
+ server_ip (str, optional): The IP address of the server. Defaults to "127.0.0.1".
28
+ server_port (int, optional): The port of the server. Defaults to 8000.
29
+ *args: Variable length argument list.
30
+ **kwargs: Arbitrary keyword arguments.
31
+
32
+ Raises:
33
+ KeyError: If 'num_threads' or 'max_context_length' is missing in generation_kwargs.
34
+ """
21
35
  print("正在从本地加载模型...")
22
36
  if device.lower() == 'cpu':
23
37
  super().__init__(
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: hjxdl
3
- Version: 0.0.16
3
+ Version: 0.0.17
4
4
  Summary: A collection of functions for Jupyter notebooks
5
5
  Home-page: https://github.com/huluxiaohuowa/hdl
6
6
  Author: Jianxing Hu
@@ -1,5 +1,5 @@
1
1
  hdl/__init__.py,sha256=5sZZNySv08wwfzJcSDssGTqUn9wlmDsR6R4XB8J8mFM,70
2
- hdl/_version.py,sha256=C1uSJtiL3eBiXPR4mc0kyqGBqfZj8NitaI9frAY9h7I,413
2
+ hdl/_version.py,sha256=OXG6jb6QQz55miFHOqfJx8zqIQYlPcgtvsnb6XEE5Fs,413
3
3
  hdl/args/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
4
  hdl/args/loss_args.py,sha256=s7YzSdd7IjD24rZvvOrxLLFqMZQb9YylxKeyelSdrTk,70
5
5
  hdl/controllers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -84,11 +84,11 @@ hdl/utils/database_tools/connect.py,sha256=KUnVG-8raifEJ_N0b3c8LkTTIfn9NIyw8LX6q
84
84
  hdl/utils/general/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
85
85
  hdl/utils/general/glob.py,sha256=8-RCnt6L297wMIfn34ZAMCsGCZUjHG3MGglGZI1cX0g,491
86
86
  hdl/utils/llm/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
87
- hdl/utils/llm/chat.py,sha256=q5644lQ-oGoCZVMMVJp4qPUe4oGf7XZ-nuLItC8CeSw,10813
87
+ hdl/utils/llm/chat.py,sha256=H2c8assJlSdZQKIfPkYrVZHqv66TsdsxtaLXv0kNe1w,11565
88
88
  hdl/utils/llm/embs.py,sha256=yCFtc25gUFas6kwgOGBFydeaHNyQMq5y1Chxl8TNEUQ,2190
89
89
  hdl/utils/schedulers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
90
90
  hdl/utils/schedulers/norm_lr.py,sha256=bDwCmdEK-WkgxQMFBiMuchv8Mm7C0-GZJ6usm-PQk14,4461
91
- hjxdl-0.0.16.dist-info/METADATA,sha256=_xC63dyfzZes4vmGeFZbRM0bDBxAmLWcc_BzcsFqB40,543
92
- hjxdl-0.0.16.dist-info/WHEEL,sha256=Z4pYXqR_rTB7OWNDYFOm1qRk0RX6GFP2o8LgvP453Hk,91
93
- hjxdl-0.0.16.dist-info/top_level.txt,sha256=-kxwTM5JPhylp06z3zAVO3w6_h7wtBfBo2zgM6YZoTk,4
94
- hjxdl-0.0.16.dist-info/RECORD,,
91
+ hjxdl-0.0.17.dist-info/METADATA,sha256=MBuoruFG8xTqFc-epdvuhZWoQwbpo28-fTfi7QJPijc,543
92
+ hjxdl-0.0.17.dist-info/WHEEL,sha256=Z4pYXqR_rTB7OWNDYFOm1qRk0RX6GFP2o8LgvP453Hk,91
93
+ hjxdl-0.0.17.dist-info/top_level.txt,sha256=-kxwTM5JPhylp06z3zAVO3w6_h7wtBfBo2zgM6YZoTk,4
94
+ hjxdl-0.0.17.dist-info/RECORD,,
File without changes