Furyton commited on
Commit
816279e
·
1 Parent(s): 2c7f9e8
Files changed (1) hide show
  1. README.md +5 -3
README.md CHANGED
@@ -247,12 +247,14 @@ pip install protobuf==3.20.0 transformers==4.27.1 icetk cpm_kernels
247
 
248
  ## 代码调用
249
 
250
- 可以通过如下代码调用夫子•明察模型来生成对话:
 
 
251
 
252
  ```ipython
253
  >>> from transformers import AutoTokenizer, AutoModel
254
- >>> tokenizer = AutoTokenizer.from_pretrained("SDUIRLab/fuzi.mingcha-v1.0", trust_remote_code=True)
255
- >>> model = AutoModel.from_pretrained("SDUIRLab/fuzi.mingcha-v1.0", trust_remote_code=True).half().cuda()
256
  >>> response, history = model.chat(tokenizer, "你好", history=[])
257
  >>> print(response)
258
  你好,有什么我可以帮您解答的问题吗?
 
247
 
248
  ## 代码调用
249
 
250
+ 夫子•明察基于 ChatGLM 进行司法垂直领域增量训练,所以其使用方法与 ChatGLM 相同。
251
+
252
+ 将权重下载完毕后,可以通过如下代码调用夫子•明察模型来生成对话:(将 "/path/to/fuzi.mingcha-v1.0" 改为权重的放置路径)
253
 
254
  ```ipython
255
  >>> from transformers import AutoTokenizer, AutoModel
256
+ >>> tokenizer = AutoTokenizer.from_pretrained("/path/to/fuzi.mingcha-v1.0", trust_remote_code=True)
257
+ >>> model = AutoModel.from_pretrained("/path/to/fuzi.mingcha-v1.0", trust_remote_code=True).half().cuda()
258
  >>> response, history = model.chat(tokenizer, "你好", history=[])
259
  >>> print(response)
260
  你好,有什么我可以帮您解答的问题吗?