Instructions to use ping98k/typhoon-7b-rag-instruct-th with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ping98k/typhoon-7b-rag-instruct-th with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="ping98k/typhoon-7b-rag-instruct-th")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("ping98k/typhoon-7b-rag-instruct-th") model = AutoModelForCausalLM.from_pretrained("ping98k/typhoon-7b-rag-instruct-th") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use ping98k/typhoon-7b-rag-instruct-th with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ping98k/typhoon-7b-rag-instruct-th" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ping98k/typhoon-7b-rag-instruct-th", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/ping98k/typhoon-7b-rag-instruct-th
- SGLang
How to use ping98k/typhoon-7b-rag-instruct-th 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 "ping98k/typhoon-7b-rag-instruct-th" \ --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": "ping98k/typhoon-7b-rag-instruct-th", "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 "ping98k/typhoon-7b-rag-instruct-th" \ --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": "ping98k/typhoon-7b-rag-instruct-th", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use ping98k/typhoon-7b-rag-instruct-th with Docker Model Runner:
docker model run hf.co/ping98k/typhoon-7b-rag-instruct-th
ทำไม Prompt ด้วย ### Response: แทนที่เป็น ### Output:
ทำไมไม่ใช้เป็น อย่างข้างล่างครับ
ตอน Train มันไม่ได้ใช้เป็น ### Output: หรือครับ ตามใน Axolotl Config ที่กำหนด datasets: เป็น type: alpaca
ต้องขอโทษอีกครั้งครับ ที่ต้องรบกวน
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
Instruction:
ท่าอากาศยานสุวรรณภูมิห่างจากกรุงเทพเท่าไหร่
Input:
=======START OF DOCUMENT=======
ท่าอากาศยานสุวรรณภูมิ (IATA: BKK, ICAO: VTBS) เป็นสนามบินที่ตั้งอยู่ที่ถนนเทพรัตนและทางพิเศษบูรพาวิถี ในเขตตำบลหนองปรือและตำบลราชาเทวะ อำเภอบางพลี จังหวัดสมุทรปราการ ห่างจากใจกลางกรุงเทพมหานครประมาณ 25 กิโลเมตร เปิดให้บริการเชิงพาณิชย์เต็มรูปแบบอย่างเป็นทางการเมื่อวันที่ 28 กันยายน พ.ศ. 2549[3] ท่าอากาศยานสุวรรณภูมิ เป็นท่าอากาศยานที่ใหญ่ที่สุดในประเทศไทย เป็นท่าอากาศยานที่ให้บริการเที่ยวบินระหว่างประเทศ (International Airport)[4] และ เป็นท่าอากาศยานที่มีสายการบินจำนวนมากที่สุดในประเทศไทย รัฐบาลได้กำหนดให้ท่าอากาศยานนานาชาติสุวรรณภูมิเป็นท่าอากาศยานหลักของประเทศไทยแทนท่าอากาศยานดอนเมือง และตั้งเป้าให้เป็นศูนย์กลางการบินในทวีปเอเชีย อีกทั้งการเน้นพัฒนาคุณภาพการให้บริการของท่าอากาศยานให้ได้รับการจัดอันดับ 1 ใน 10 ท่าอากาศยานที่มีคุณภาพการบริการดีที่สุดในโลกในปี พ.ศ. 2553[5]ปัจจุบันคุณ กิตติพงศ์ กิตติขจร เป็นผู้อำนวยการท่าอากาศยานสุวรรณภูมิ
=======NEXT DOCUMENT=======
ท่าอากาศยานสุวรรณภูมิให้บริการสายการบินที่ทำการบินแบบประจำในช่วง 27 ตุลาคม พ.ศ. 2562 ถึง 31 ธันวาคม พ.ศ. 2562 สูงสุด 104 สายการบิน ขนส่งอากาศยาน 11 สายการบิน และสายการบินเช่าเหมาลำ 1 สายการบิน สายการบินเช่าเหมาลำภายในประเทศทำการบินไปสนามบินเกาะไม้ซี้ 1 สายการบิน รวม 117 สายการบิน ซึ่งถือว่าบริการตามจำนวนสายการบินมากที่สุดแห่งหนึ่งของโลก (สามารถรองรับเที่ยวบิน 76 เที่ยวต่อชั่วโมงและผู้โดยสาร 45 ล้านคนต่อปี) [9]และศูนย์กลางการขนส่งทางอากาศ (สามารถรองรับสินค้าได้ 3 ล้านตันต่อปี) [9] นอกจากนี้ยังมีทางหลวงพิเศษที่ทันสมัยซึ่งเชื่อมต่อระหว่างท่าอากาศยาน กรุงเทพมหานคร และนิคมอุตสาหกรรมอิสเทิร์น ซีบอร์ด สายการบินหลายแห่ง ได้แก่ การบินไทย การบินไทยสมายล์ บางกอกแอร์เวย์ และไทยเวียดเจ็ทแอร์ ได้เลือกท่าอากาศยานสุวรรณภูมิเป็นศูนย์กลางการบิน
=======END OF DOCUMENT=======
Output:
ตัวนี้ใช้ prompt ตาม https://github.com/tatsu-lab/stanford_alpaca เลยครับไม่ได้ไปconfig อะไรเพิ่ม
Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
{instruction}
### Input:
{input}
### Response: