Instructions to use readerbench/RoGPT2-medium with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use readerbench/RoGPT2-medium with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="readerbench/RoGPT2-medium")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("readerbench/RoGPT2-medium") model = AutoModelForCausalLM.from_pretrained("readerbench/RoGPT2-medium") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use readerbench/RoGPT2-medium with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "readerbench/RoGPT2-medium" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "readerbench/RoGPT2-medium", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/readerbench/RoGPT2-medium
- SGLang
How to use readerbench/RoGPT2-medium with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "readerbench/RoGPT2-medium" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "readerbench/RoGPT2-medium", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "readerbench/RoGPT2-medium" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "readerbench/RoGPT2-medium", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use readerbench/RoGPT2-medium with Docker Model Runner:
docker model run hf.co/readerbench/RoGPT2-medium
Commit ·
7e75ef2
1
Parent(s): f0587eb
Update README.md
Browse files
README.md
CHANGED
|
@@ -8,9 +8,9 @@ language:
|
|
| 8 |
# RoGPT2: Romanian GPT2 for text generation
|
| 9 |
|
| 10 |
All models are available:
|
| 11 |
-
* [
|
| 12 |
-
* [
|
| 13 |
-
* [
|
| 14 |
|
| 15 |
For code and evaluation check out [GitHub](https://github.com/readerbench/RoGPT2).
|
| 16 |
|
|
@@ -191,4 +191,13 @@ Research supported with [Cloud TPUs](https://cloud.google.com/tpu/) from Google'
|
|
| 191 |
|
| 192 |
---
|
| 193 |
|
| 194 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 8 |
# RoGPT2: Romanian GPT2 for text generation
|
| 9 |
|
| 10 |
All models are available:
|
| 11 |
+
* [RoGPT2-base](https://huggingface.co/readerbench/RoGPT2-base)
|
| 12 |
+
* [RoGPT2-medium](https://huggingface.co/readerbench/RoGPT2-medium)
|
| 13 |
+
* [RoGPT2-large](https://huggingface.co/readerbench/RoGPT2-large)
|
| 14 |
|
| 15 |
For code and evaluation check out [GitHub](https://github.com/readerbench/RoGPT2).
|
| 16 |
|
|
|
|
| 191 |
|
| 192 |
---
|
| 193 |
|
| 194 |
+
```bibtex
|
| 195 |
+
@inproceedings{niculescu2021rogpt2,
|
| 196 |
+
title={RoGPT2: Romanian GPT2 for Text Generation},
|
| 197 |
+
author={Niculescu, Mihai Alexandru and Ruseti, Stefan and Dascalu, Mihai},
|
| 198 |
+
booktitle={2021 IEEE 33rd International Conference on Tools with Artificial Intelligence (ICTAI)},
|
| 199 |
+
pages={1154--1161},
|
| 200 |
+
year={2021},
|
| 201 |
+
organization={IEEE}
|
| 202 |
+
}
|
| 203 |
+
```
|