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", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- 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
| license: apache-2.0 | |
| language: | |
| - th | |
| pipeline_tag: text-generation | |
| library_name: transformers | |
| tags: | |
| - openthaigpt | |
| widget: | |
| - text: "คำถาม: ซื้อมะม่วงมา 30ลูก ระหว่างกลับบ้านหล่นไป 15ลูก เลยจอดรถเก็บมาได้ 5ลูก ให้เพื่อนไป 7ผล ปลอกกินไป 2ลูก เน่าไปอีก 3ลูก ของเก่าอยู่ในตู้เย็นอีก 3ลูก จะมีมะม่วงเท่าไร" | |
| - text: "คำถาม: จงหาเลขคู่ที่มากกว่าหรือเท่ากับ 10 แต่น้อยกว่าหรือเท่ากับ 20" | |
| - text: "คำถาม: จงหาค่า x ในสมการ (x/2) + 7 = 10" | |
| - text: "คำถาม: ถ้ามีเพื่อนซื้อเนื้อวัวไป 5 กิโลกรัม และจ่ายราคา 300 บาทต่อกิโลกรัม จะต้องจ่ายเงินรวมทั้งสิ้นเท่าไร" | |
| - text: "คำถาม: ถ้ามีสามเหลี่ยมที่มีด้านเท่ากันทั้งหมด ความยาวด้านของแต่ละด้านคือ 4 เซนติเมตร จงหาพื้นที่ของสามเหลี่ยมนั้น" | |
| # OTG-Math-680 | |
| This model is fine-tuned version of [Open Thai GPT](https://huggingface.co/kobkrit/openthaigpt-gpt2-pantipwiki-poc-0.0.1) with Thai Math QA 680 pairs dataset (GSM8K, GPT-3.5 Generated, Chain of Thought). |