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