Instructions to use project2you/thai_llm2-gpt with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use project2you/thai_llm2-gpt with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="project2you/thai_llm2-gpt")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("project2you/thai_llm2-gpt") model = AutoModelForCausalLM.from_pretrained("project2you/thai_llm2-gpt", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use project2you/thai_llm2-gpt with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "project2you/thai_llm2-gpt" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "project2you/thai_llm2-gpt", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/project2you/thai_llm2-gpt
- SGLang
How to use project2you/thai_llm2-gpt 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 "project2you/thai_llm2-gpt" \ --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": "project2you/thai_llm2-gpt", "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 "project2you/thai_llm2-gpt" \ --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": "project2you/thai_llm2-gpt", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use project2you/thai_llm2-gpt with Docker Model Runner:
docker model run hf.co/project2you/thai_llm2-gpt
Download tokenizer.model from project2you/thai_llm2-gpt: direct link, hf CLI and curl.
- Browser
- Download file 1.17 MB
-
https://huggingface.co/project2you/thai_llm2-gpt/resolve/main/tokenizer.model
- Command line
-
hf download hf://project2you/thai_llm2-gpt/tokenizer.model
-
curl -L -o tokenizer.model https://huggingface.co/project2you/thai_llm2-gpt/resolve/main/tokenizer.model
1.17 MB
- Xet hash:
- 96de44ae37b7e9ae22078218542a13bd7fd7e8cbd4c2d655a864dedc8367c0f0
- Size of remote file:
- 1.17 MB
- SHA256:
- 2d5981dd688587f9a3c627d7efcdcba36395bf0225a0d96dab25deca55ae02f4
·
Xet efficiently stores Large Files inside Git, intelligently splitting files into unique chunks and accelerating uploads and downloads. More info.