Text Generation
Transformers
PyTorch
TensorBoard
Safetensors
gpt2
Generated from Trainer
text-generation-inference
Instructions to use bipin/malayalam-gpt2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use bipin/malayalam-gpt2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="bipin/malayalam-gpt2")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("bipin/malayalam-gpt2") model = AutoModelForCausalLM.from_pretrained("bipin/malayalam-gpt2") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use bipin/malayalam-gpt2 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "bipin/malayalam-gpt2" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "bipin/malayalam-gpt2", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/bipin/malayalam-gpt2
- SGLang
How to use bipin/malayalam-gpt2 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 "bipin/malayalam-gpt2" \ --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": "bipin/malayalam-gpt2", "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 "bipin/malayalam-gpt2" \ --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": "bipin/malayalam-gpt2", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use bipin/malayalam-gpt2 with Docker Model Runner:
docker model run hf.co/bipin/malayalam-gpt2
Training in progress, step 500
Browse files- pytorch_model.bin +1 -1
- runs/Mar20_07-54-10_cc2eb069e138/events.out.tfevents.1647763001.cc2eb069e138.53.0 +2 -2
- runs/Mar20_09-29-54_cc2eb069e138/1647768601.4479933/events.out.tfevents.1647768601.cc2eb069e138.53.3 +3 -0
- runs/Mar20_09-29-54_cc2eb069e138/events.out.tfevents.1647768601.cc2eb069e138.53.2 +3 -0
- tokenizer.json +1 -6
- training_args.bin +1 -1
pytorch_model.bin
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 515758313
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:37a134e321294f7db4a8809189f7a1e05f31e96a328ecb37ae364269d7d2f3eb
|
| 3 |
size 515758313
|
runs/Mar20_07-54-10_cc2eb069e138/events.out.tfevents.1647763001.cc2eb069e138.53.0
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:6ff941020f3cf77fe196dd8b08b1978b6fbb4e7783e46c005adf076df78a7d93
|
| 3 |
+
size 5155
|
runs/Mar20_09-29-54_cc2eb069e138/1647768601.4479933/events.out.tfevents.1647768601.cc2eb069e138.53.3
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:64ac61d466e222422d2e07b52d891ef809d0c71a4c39dfd090fcbdea725fd6de
|
| 3 |
+
size 4750
|
runs/Mar20_09-29-54_cc2eb069e138/events.out.tfevents.1647768601.cc2eb069e138.53.2
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:45ba31c5ea9b3351d067ab0264b8c5e8a8af2180dbd934b1619babbb6fc3fdd7
|
| 3 |
+
size 3703
|
tokenizer.json
CHANGED
|
@@ -1,11 +1,6 @@
|
|
| 1 |
{
|
| 2 |
"version": "1.0",
|
| 3 |
-
"truncation":
|
| 4 |
-
"direction": "Right",
|
| 5 |
-
"max_length": 128,
|
| 6 |
-
"strategy": "LongestFirst",
|
| 7 |
-
"stride": 0
|
| 8 |
-
},
|
| 9 |
"padding": null,
|
| 10 |
"added_tokens": [
|
| 11 |
{
|
|
|
|
| 1 |
{
|
| 2 |
"version": "1.0",
|
| 3 |
+
"truncation": null,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
"padding": null,
|
| 5 |
"added_tokens": [
|
| 6 |
{
|
training_args.bin
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 2991
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:3f77f66088d76a3b37f77baebf7987022c52b4d45c2dacc7aa7274dd23ece026
|
| 3 |
size 2991
|