Instructions to use nakcnx/OTG-Math-680 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use nakcnx/OTG-Math-680 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="nakcnx/OTG-Math-680")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("nakcnx/OTG-Math-680") model = AutoModelForCausalLM.from_pretrained("nakcnx/OTG-Math-680") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use nakcnx/OTG-Math-680 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "nakcnx/OTG-Math-680" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "nakcnx/OTG-Math-680", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/nakcnx/OTG-Math-680
- SGLang
How to use nakcnx/OTG-Math-680 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 "nakcnx/OTG-Math-680" \ --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": "nakcnx/OTG-Math-680", "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 "nakcnx/OTG-Math-680" \ --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": "nakcnx/OTG-Math-680", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use nakcnx/OTG-Math-680 with Docker Model Runner:
docker model run hf.co/nakcnx/OTG-Math-680
Create README.md
Browse files
README.md
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
license: apache-2.0
|
| 2 |
+
language:
|
| 3 |
+
- th
|
| 4 |
+
pipeline_tag: text-generation
|
| 5 |
+
tags:
|
| 6 |
+
- openthaigpt
|
| 7 |
+
library_name: transformers
|
| 8 |
+
widget:
|
| 9 |
+
- text: คำถาม: ซื้อมะม่วงมา 30ลูก ระหว่างกลับบ้านหล่นไป 15ลูก เลยจอดรถเก็บมาได้ 5ลูก ให้เพื่อนไป 7ผล ปลอกกินไป 2ลูก เน่าไปอีก 3ลูก ของเก่าอยู่ในตู้เย็นอีก 3ลูก จะมีมะม่วงเท่าไร
|
| 10 |
+
- text: คำถาม: จงหาเลขคู่ที่มากกว่าหรือเท่ากับ 10 แต่น้อยกว่าหรือเท่ากับ 20
|
| 11 |
+
- text: คำถาม: จงหาค่า x ในสมการ (x/2) + 7 = 10
|
| 12 |
+
- text: คำถาม: ถ้ามีเพื่อนซื้อเนื้อวัวไป 5 กิโลกรัม และจ่ายราคา 300 บาทต่อกิโลกรัม จะต้องจ่ายเงินรวมทั้งสิ้นเท่าไร
|
| 13 |
+
- text: คำถาม: ถ้ามีสามเหลี่ยมที่มีด้านเท่ากันทั้งหมด ความยาวด้านของแต่ละด้านคือ 4 เซนติเมตร จงหาพื้นที่ของสามเหลี่ยมนั้น
|
| 14 |
+
|
| 15 |
+
# OTG-Math-680
|
| 16 |
+
|
| 17 |
+
This model is a fine-tuned version of [](https://huggingface.co/kobkrit/openthaigpt-gpt2-pantipwiki-poc-0.0.1) with Thai Math QA 680 Pairs dataset.
|