allenai/MADLAD-400
Updated • 32k • 168
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") # 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")How to use ping98k/th-7b-20gb-base with vLLM:
# 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
}'docker model run hf.co/ping98k/th-7b-20gb-base
How to use ping98k/th-7b-20gb-base with SGLang:
# 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
}'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
}'How to use ping98k/th-7b-20gb-base with Docker Model Runner:
docker model run hf.co/ping98k/th-7b-20gb-base
This model is a continue pre-training version of openthaigpt/openthaigpt-1.0.0-beta-7b-chat-ckpt-hf on the 20GB Thai dataset. It achieves the following results on the evaluation set:
import torch
from transformers import pipeline
text_generator = pipeline("text-generation", model="ping98k/th-7b-20gb-base", torch_dtype=torch.bfloat16, device_map="auto")
print(text_generator("แบบจำลองทางวิทยาศาสตร์ (scientific modeling) คือ", max_length=50))
More information needed
More information needed
More information needed
The following hyperparameters were used during training:
| Training Loss | Epoch | Step | Validation Loss |
|---|---|---|---|
| 4.0347 | 0.0 | 1 | 4.0530 |
| 2.2753 | 0.05 | 1179 | 2.2083 |
| 2.1613 | 0.1 | 2358 | 2.0422 |
| 2.0696 | 0.15 | 3537 | 1.9526 |
| 1.945 | 0.2 | 4716 | 1.8886 |
| 1.6807 | 0.25 | 5895 | 1.8340 |
| 1.5838 | 0.3 | 7074 | 1.7961 |
| 1.7497 | 0.35 | 8253 | 1.7548 |
| 1.535 | 0.4 | 9432 | 1.7237 |
| 1.9632 | 0.45 | 10611 | 1.6878 |
| 1.9091 | 0.5 | 11790 | 1.6631 |
| 1.6837 | 0.55 | 12969 | 1.6344 |
| 1.7054 | 0.6 | 14148 | 1.6131 |
| 1.463 | 0.65 | 15327 | 1.5980 |
| 1.5538 | 0.7 | 16506 | 1.5853 |
| 1.5095 | 0.75 | 17685 | 1.5780 |
| 1.7322 | 0.8 | 18864 | 1.5742 |
| 1.5645 | 0.85 | 20043 | 1.5727 |
| 1.72 | 0.9 | 21222 | 1.5722 |
| 1.5882 | 0.95 | 22401 | 1.5721 |