Text Generation
Transformers
Safetensors
Thai
llama
Generated from Trainer
text-generation-inference
Instructions to use ping98k/th-7b-20gb-base with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ping98k/th-7b-20gb-base with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="ping98k/th-7b-20gb-base")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("ping98k/th-7b-20gb-base") model = AutoModelForCausalLM.from_pretrained("ping98k/th-7b-20gb-base", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use ping98k/th-7b-20gb-base with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ping98k/th-7b-20gb-base" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ping98k/th-7b-20gb-base", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/ping98k/th-7b-20gb-base
- SGLang
How to use ping98k/th-7b-20gb-base 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/th-7b-20gb-base" \ --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/th-7b-20gb-base", "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/th-7b-20gb-base" \ --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/th-7b-20gb-base", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use ping98k/th-7b-20gb-base with Docker Model Runner:
docker model run hf.co/ping98k/th-7b-20gb-base
Download tokenizer.model from ping98k/th-7b-20gb-base: direct link, hf CLI and curl.
- Browser
- Download file 1.17 MB
-
https://huggingface.co/ping98k/th-7b-20gb-base/resolve/main/tokenizer.model
- Command line
-
hf download hf://ping98k/th-7b-20gb-base/tokenizer.model
-
curl -L -o tokenizer.model https://huggingface.co/ping98k/th-7b-20gb-base/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.