Text Generation
Transformers
TensorFlow
TensorBoard
gpt2
generated_from_keras_callback
id
Indonesian
Instructions to use Sultannn/gpt2-ft-id-puisi with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Sultannn/gpt2-ft-id-puisi with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Sultannn/gpt2-ft-id-puisi")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Sultannn/gpt2-ft-id-puisi") model = AutoModelForCausalLM.from_pretrained("Sultannn/gpt2-ft-id-puisi", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Sultannn/gpt2-ft-id-puisi with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Sultannn/gpt2-ft-id-puisi" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Sultannn/gpt2-ft-id-puisi", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Sultannn/gpt2-ft-id-puisi
- SGLang
How to use Sultannn/gpt2-ft-id-puisi 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 "Sultannn/gpt2-ft-id-puisi" \ --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": "Sultannn/gpt2-ft-id-puisi", "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 "Sultannn/gpt2-ft-id-puisi" \ --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": "Sultannn/gpt2-ft-id-puisi", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Sultannn/gpt2-ft-id-puisi with Docker Model Runner:
docker model run hf.co/Sultannn/gpt2-ft-id-puisi
gpt2-ft-id-puisi
This model is a fine-tuned on an Indonesian Recipe. It achieves the following results on the evaluation set:
- Train Loss: 5.3628
- Validation Loss: 5.8179
Training results
| Train Loss | Validation Loss | Epoch |
|---|---|---|
| 7.3561 | 6.5449 | 0 |
| 6.2176 | 6.1573 | 1 |
| 5.8533 | 6.0014 | 2 |
| 5.5955 | 5.8798 | 3 |
| 5.3628 | 5.8179 | 4 |
Licenese
- Downloads last month
- 986