Instructions to use sekarmulyani/gpt2-ulasan-ecommerce with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use sekarmulyani/gpt2-ulasan-ecommerce with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="sekarmulyani/gpt2-ulasan-ecommerce")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("sekarmulyani/gpt2-ulasan-ecommerce") model = AutoModelForCausalLM.from_pretrained("sekarmulyani/gpt2-ulasan-ecommerce") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use sekarmulyani/gpt2-ulasan-ecommerce with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "sekarmulyani/gpt2-ulasan-ecommerce" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "sekarmulyani/gpt2-ulasan-ecommerce", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/sekarmulyani/gpt2-ulasan-ecommerce
- SGLang
How to use sekarmulyani/gpt2-ulasan-ecommerce 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 "sekarmulyani/gpt2-ulasan-ecommerce" \ --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": "sekarmulyani/gpt2-ulasan-ecommerce", "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 "sekarmulyani/gpt2-ulasan-ecommerce" \ --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": "sekarmulyani/gpt2-ulasan-ecommerce", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use sekarmulyani/gpt2-ulasan-ecommerce with Docker Model Runner:
docker model run hf.co/sekarmulyani/gpt2-ulasan-ecommerce
| Epoch | Training Loss | Validation Loss | Perplexity |
|---|---|---|---|
| 1 | 3.450200 | 3.380510 | |
| 2 | 3.309700 | 3.281852 | |
| 3 | 3.238600 | 3.230116 | |
| 4 | 3.200200 | 3.195386 | |
| 5 | 3.148400 | 3.170542 | |
| 6 | 3.125000 | 3.151122 | 23.36 |
| 7 | 3.102700 | 3.136005 | |
| 8 | 3.091500 | 3.123388 | |
| 9 | 3.067200 | 3.112496 | |
| 10 | 3.057800 | 3.103361 | |
| 11 | 3.039200 | 3.095544 | |
| 12 | 3.023500 | 3.088650 | 21.95 |
| 13 | 3.012200 | 3.082917 | |
| 14 | 3.009600 | 3.077587 | |
| 15 | 2.998100 | 3.073186 | |
| 16 | 2.987500 | 3.069203 | |
| 17 | 2.975100 | 3.065609 | |
| 18 | 2.974400 | 3.062548 | 21.38 |
| 19 | 2.969300 | 3.059562 | |
| 20 | 2.956800 | 3.057292 | |
| 21 | 2.950900 | 3.054723 | |
| 22 | 2.952200 | 3.052954 | |
| 23 | 2.944300 | 3.051039 | |
| 24 | 2.939600 | 3.049278 | 21.10 |
| 25 | 2.923400 | 3.047985 | |
| 26 | 2.919100 | 3.046863 | |
| 27 | 2.932800 | 3.045910 | |
| 28 | 2.922700 | 3.045190 | |
| 29 | 2.917000 | 3.044068 | |
| 30 | 2.922100 | 3.043669 | 20.98 |
| 31 | 2.910200 | 3.043278 | |
| 32 | 2.911400 | 3.042759 | |
| 33 | 2.913500 | 3.042451 | |
| 34 | 2.902300 | 3.042186 | |
| 35 | 2.914200 | 3.042054 | |
| 36 | 2.905900 | 3.042003 | 20.95 |
- Downloads last month
- 2