shibing624 commited on
Commit
4591571
1 Parent(s): 81e8855

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +9 -12
README.md CHANGED
@@ -28,22 +28,22 @@ The overall performance of chatglm-6b-csc-zh-lora on CSC **test**:
28
 
29
  ## Usage
30
 
31
- 本项目开源在lmft项目:[lmft](https://github.com/shibing624/lmft),可支持ChatGLM模型,通过如下命令调用:
32
 
33
  Install package:
34
  ```shell
35
- pip install -U lmft
36
  ```
37
 
38
  ```python
39
- from lmft import ChatGlmModel
40
  model = ChatGlmModel("chatglm", "THUDM/chatglm-6b", lora_name="shibing624/chatglm-6b-csc-zh-lora")
41
  r = model.predict(["对下面中文拼写纠错:\n少先队员因该为老人让坐。\n答:"])
42
  print(r) # ['少先队员应该为老人让座。\n错误字:因,坐']
43
  ```
44
 
45
  ## Usage (HuggingFace Transformers)
46
- Without [lmft](https://github.com/shibing624/lmft), you can use the model like this:
47
 
48
  First, you pass your input through the transformer model, then you get the generated sentence.
49
 
@@ -93,19 +93,16 @@ chatglm-6b-csc-zh-lora
93
 
94
 
95
 
96
- 如果需要训练ChatGLM模型,请参考[https://github.com/shibing624/lmft](https://github.com/shibing624/lmft)
97
 
98
 
99
  ## Citation
100
 
101
  ```latex
102
- @software{lmft,
103
  author = {Xu Ming},
104
- title = {lmft: Implementation of language model finetune},
105
- year = {2023},
106
- url = {https://github.com/shibing624/lmft},
107
  }
108
  ```
109
-
110
-
111
-
 
28
 
29
  ## Usage
30
 
31
+ 本项目开源在textgen项目:[textgen](https://github.com/shibing624/textgen),可支持ChatGLM原生模型和LoRA微调后的模型,通过如下命令调用:
32
 
33
  Install package:
34
  ```shell
35
+ pip install -U textgen
36
  ```
37
 
38
  ```python
39
+ from textgen import ChatGlmModel
40
  model = ChatGlmModel("chatglm", "THUDM/chatglm-6b", lora_name="shibing624/chatglm-6b-csc-zh-lora")
41
  r = model.predict(["对下面中文拼写纠错:\n少先队员因该为老人让坐。\n答:"])
42
  print(r) # ['少先队员应该为老人让座。\n错误字:因,坐']
43
  ```
44
 
45
  ## Usage (HuggingFace Transformers)
46
+ Without [textgen](https://github.com/shibing624/textgen), you can use the model like this:
47
 
48
  First, you pass your input through the transformer model, then you get the generated sentence.
49
 
 
93
 
94
 
95
 
96
+ 如果需要训练ChatGLM模型,请参考[https://github.com/shibing624/textgen](https://github.com/shibing624/textgen)
97
 
98
 
99
  ## Citation
100
 
101
  ```latex
102
+ @software{textgen,
103
  author = {Xu Ming},
104
+ title = {textgen: Implementation of language model finetune},
105
+ year = {2021},
106
+ url = {https://github.com/shibing624/textgen},
107
  }
108
  ```