Text Generation
Transformers
PyTorch
TensorFlow
JAX
TensorBoard
Safetensors
Arabic
gpt2
text-generation-inference
Instructions to use aubmindlab/aragpt2-base with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use aubmindlab/aragpt2-base with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="aubmindlab/aragpt2-base")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("aubmindlab/aragpt2-base") model = AutoModelForCausalLM.from_pretrained("aubmindlab/aragpt2-base") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use aubmindlab/aragpt2-base with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "aubmindlab/aragpt2-base" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "aubmindlab/aragpt2-base", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/aubmindlab/aragpt2-base
- SGLang
How to use aubmindlab/aragpt2-base 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 "aubmindlab/aragpt2-base" \ --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": "aubmindlab/aragpt2-base", "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 "aubmindlab/aragpt2-base" \ --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": "aubmindlab/aragpt2-base", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use aubmindlab/aragpt2-base with Docker Model Runner:
docker model run hf.co/aubmindlab/aragpt2-base
Commit ·
e5f5983
1
Parent(s): 3e0a6d8
added tensorboard logs
Browse files
.gitattributes
CHANGED
|
@@ -7,3 +7,4 @@
|
|
| 7 |
*.ot filter=lfs diff=lfs merge=lfs -text
|
| 8 |
*.onnx filter=lfs diff=lfs merge=lfs -text
|
| 9 |
*.msgpack filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
| 7 |
*.ot filter=lfs diff=lfs merge=lfs -text
|
| 8 |
*.onnx filter=lfs diff=lfs merge=lfs -text
|
| 9 |
*.msgpack filter=lfs diff=lfs merge=lfs -text
|
| 10 |
+
events.out.tfevents* filter=lfs diff=lfs merge=lfs -text
|
runs/eval/events.out.tfevents.1608681654.tpu-mother
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:05df33f0f7f994117e51ab6c93e2a8c4d44eff592b66eb51bc7346dcfd4f3d04
|
| 3 |
+
size 1518487
|
runs/eval_results.txt
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
bpc = 5.7945323
|
| 2 |
+
global_step = 125000
|
| 3 |
+
loss = 4.016464
|
| 4 |
+
perplexity = 55.811718
|
runs/events.out.tfevents.1608138983.tpu-mother
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d03e76d31189a26ebb8b983195ce34c122e1622ab40c088b66e861f56899289c
|
| 3 |
+
size 31126434
|
runs/events.out.tfevents.1608227376.tpu-mother
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:5780dee6fd14537dbaa204a030934932da8f9b5caea44d33307b72799360d237
|
| 3 |
+
size 31124470
|