|
--- |
|
datasets: |
|
- HuggingFaceFW/fineweb |
|
language: |
|
- en |
|
library_name: transformers |
|
license: unlicense |
|
metrics: |
|
- perplexity |
|
pipeline_tag: text-generation |
|
tags: |
|
- text-generation-inference |
|
- casual-lm |
|
- question-answering |
|
- text-generation |
|
--- |
|
# Judge-GPT2 |
|
|
|
Judge-GPT2 is a custom GPT-2 model designed for text generation tasks. |
|
|
|
## Model Information |
|
|
|
- **Name**: Judge-GPT2 |
|
- **Version**: 1.0 |
|
- **Description**: Judge-GPT2 is a variant of the GPT-2 model with custom configurations. It has been pretrained and finetuned for specific text generation tasks. |
|
|
|
## Model Details |
|
|
|
- **Architecture**: GPT-2 |
|
- **Pre-trained weights**: [Wonder-Griffin/Judge-GPT2](https://huggingface.co/Wonder-Griffin/Judge-GPT2) |
|
- **Training data**: Fine-tuned on HuggingFaceFW/fineweb dataset |
|
|
|
## Model Performance |
|
|
|
- **Task**: Text generation |
|
- **Metrics**: Accuracy (not applicable), Perplexity (25.3) |
|
|
|
## Usage |
|
|
|
Here is an example of how to use the model for text generation: |
|
|
|
```python |
|
from transformers import AutoTokenizer, GPT2LMHeadModel |
|
|
|
tokenizer = AutoTokenizer.from_pretrained("Wonder-Griffin/Judge-GPT2") |
|
model = GPT2LMHeadModel.from_pretrained("Wonder-Griffin/Judge-GPT2") |
|
|
|
prompt = "Once upon a time" |
|
inputs = tokenizer(prompt, return_tensors="pt") |
|
outputs = model.generate(inputs['input_ids'], max_length=50, pad_token_id=tokenizer.eos_token_id) |
|
print(tokenizer.decode(outputs[0], skip_special_tokens=True)) |