Instructions to use ClueAI/PromptCLUE-base with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ClueAI/PromptCLUE-base with Transformers:
# Load model directly from transformers import AutoTokenizer, AutoModelForSeq2SeqLM tokenizer = AutoTokenizer.from_pretrained("ClueAI/PromptCLUE-base") model = AutoModelForSeq2SeqLM.from_pretrained("ClueAI/PromptCLUE-base") - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -47,7 +47,7 @@ def preprocess(text):
|
|
| 47 |
def postprocess(text):
|
| 48 |
return text.replace("_", "\n")
|
| 49 |
|
| 50 |
-
def answer(text, sample=False, top_p=0.
|
| 51 |
'''sample:是否抽样。生成任务,可以设置为True;
|
| 52 |
top_p:0-1之间,生成的内容越多样'''
|
| 53 |
text = preprocess(text)
|
|
|
|
| 47 |
def postprocess(text):
|
| 48 |
return text.replace("_", "\n")
|
| 49 |
|
| 50 |
+
def answer(text, sample=False, top_p=0.8):
|
| 51 |
'''sample:是否抽样。生成任务,可以设置为True;
|
| 52 |
top_p:0-1之间,生成的内容越多样'''
|
| 53 |
text = preprocess(text)
|