Prompt C L U E base
ClueAIIntroduction
PromptCLUE-base is a Chinese text-to-text generation model developed by ClueAI. It is designed for zero-shot learning across a variety of tasks using prompts. The model is pre-trained on extensive Chinese corpora and fine-tuned for diverse tasks, including text classification, sentiment analysis, and text generation.
Architecture
The model is based on the T5 architecture and leverages PyTorch for implementation. It is equipped to handle tasks in the Chinese language, supporting functionalities like text generation inference and inference endpoints.
Training
PromptCLUE-base is pre-trained on 1 trillion Chinese tokens and further trained using prompt-based task-specific learning across hundreds of tasks. This includes tasks like classification, sentiment analysis, and extraction, allowing users to define custom label systems and perform free-form generation tasks.
Guide: Running Locally
-
Install Required Packages: Ensure you have the
transformers
library installed in your Python environment.pip install transformers torch
-
Load the Model: Use the following code to load the model and tokenizer:
from transformers import T5Tokenizer, T5ForConditionalGeneration tokenizer = T5Tokenizer.from_pretrained("ClueAI/PromptCLUE-base") model = T5ForConditionalGeneration.from_pretrained("ClueAI/PromptCLUE-base")
-
Inference: Move the model to a GPU if available and perform inference with sample code provided in the documentation.
import torch device = torch.device('cuda' if torch.cuda.is_available() else 'cpu') model.to(device)
-
Running on Cloud GPUs: For improved performance, consider using cloud GPU services such as Google Colab, AWS, or Azure.
License
The model is distributed under the creativeml-openrail-m
license. This license allows for a wide range of uses, provided the use complies with the terms specified.