Instructions to use Tippawan/tinyllama-codeHtml3 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use Tippawan/tinyllama-codeHtml3 with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("TinyLlama/TinyLlama-1.1B-Chat-v1.0") model = PeftModel.from_pretrained(base_model, "Tippawan/tinyllama-codeHtml3") - Transformers
How to use Tippawan/tinyllama-codeHtml3 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Tippawan/tinyllama-codeHtml3") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("Tippawan/tinyllama-codeHtml3", dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use Tippawan/tinyllama-codeHtml3 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Tippawan/tinyllama-codeHtml3" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Tippawan/tinyllama-codeHtml3", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Tippawan/tinyllama-codeHtml3
- SGLang
How to use Tippawan/tinyllama-codeHtml3 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 "Tippawan/tinyllama-codeHtml3" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Tippawan/tinyllama-codeHtml3", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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 "Tippawan/tinyllama-codeHtml3" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Tippawan/tinyllama-codeHtml3", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use Tippawan/tinyllama-codeHtml3 with Docker Model Runner:
docker model run hf.co/Tippawan/tinyllama-codeHtml3
| {"current_steps": 10, "total_steps": 250, "loss": 0.7296, "lr": 0.00019936113105200085, "epoch": 0.018885741265344664, "percentage": 4.0, "elapsed_time": "0:01:06", "remaining_time": "0:26:25"} | |
| {"current_steps": 20, "total_steps": 250, "loss": 0.1418, "lr": 0.0001971631732914674, "epoch": 0.03777148253068933, "percentage": 8.0, "elapsed_time": "0:02:09", "remaining_time": "0:24:47"} | |
| {"current_steps": 30, "total_steps": 250, "loss": 0.1158, "lr": 0.00019343289424566122, "epoch": 0.056657223796033995, "percentage": 12.0, "elapsed_time": "0:03:12", "remaining_time": "0:23:34"} | |
| {"current_steps": 40, "total_steps": 250, "loss": 0.1129, "lr": 0.00018822912264349534, "epoch": 0.07554296506137866, "percentage": 16.0, "elapsed_time": "0:04:16", "remaining_time": "0:22:25"} | |
| {"current_steps": 50, "total_steps": 250, "loss": 0.109, "lr": 0.00018163392507171842, "epoch": 0.09442870632672333, "percentage": 20.0, "elapsed_time": "0:05:18", "remaining_time": "0:21:15"} | |
| {"current_steps": 60, "total_steps": 250, "loss": 0.1082, "lr": 0.0001737513117358174, "epoch": 0.11331444759206799, "percentage": 24.0, "elapsed_time": "0:06:22", "remaining_time": "0:20:09"} | |
| {"current_steps": 70, "total_steps": 250, "loss": 0.1073, "lr": 0.00016470559615694446, "epoch": 0.13220018885741266, "percentage": 28.0, "elapsed_time": "0:07:25", "remaining_time": "0:19:04"} | |
| {"current_steps": 80, "total_steps": 250, "loss": 0.1036, "lr": 0.00015463943467342693, "epoch": 0.1510859301227573, "percentage": 32.0, "elapsed_time": "0:08:28", "remaining_time": "0:18:01"} | |
| {"current_steps": 90, "total_steps": 250, "loss": 0.0999, "lr": 0.0001437115766650933, "epoch": 0.16997167138810199, "percentage": 36.0, "elapsed_time": "0:09:32", "remaining_time": "0:16:57"} | |
| {"current_steps": 100, "total_steps": 250, "loss": 0.1009, "lr": 0.00013209436098072095, "epoch": 0.18885741265344666, "percentage": 40.0, "elapsed_time": "0:10:35", "remaining_time": "0:15:53"} | |
| {"current_steps": 110, "total_steps": 250, "loss": 0.0996, "lr": 0.00011997099805144069, "epoch": 0.2077431539187913, "percentage": 44.0, "elapsed_time": "0:11:39", "remaining_time": "0:14:50"} | |
| {"current_steps": 120, "total_steps": 250, "loss": 0.1015, "lr": 0.00010753268055279329, "epoch": 0.22662889518413598, "percentage": 48.0, "elapsed_time": "0:12:42", "remaining_time": "0:13:46"} | |
| {"current_steps": 130, "total_steps": 250, "loss": 0.1023, "lr": 9.497556818202306e-05, "epoch": 0.24551463644948066, "percentage": 52.0, "elapsed_time": "0:13:46", "remaining_time": "0:12:42"} | |
| {"current_steps": 140, "total_steps": 250, "loss": 0.1005, "lr": 8.249769410247239e-05, "epoch": 0.26440037771482533, "percentage": 56.0, "elapsed_time": "0:14:49", "remaining_time": "0:11:39"} | |
| {"current_steps": 150, "total_steps": 250, "loss": 0.0958, "lr": 7.029584184229653e-05, "epoch": 0.28328611898017, "percentage": 60.0, "elapsed_time": "0:15:52", "remaining_time": "0:10:35"} | |
| {"current_steps": 160, "total_steps": 250, "loss": 0.0972, "lr": 5.856244190067159e-05, "epoch": 0.3021718602455146, "percentage": 64.0, "elapsed_time": "0:16:57", "remaining_time": "0:09:32"} | |
| {"current_steps": 170, "total_steps": 250, "loss": 0.0977, "lr": 4.748253700387042e-05, "epoch": 0.3210576015108593, "percentage": 68.0, "elapsed_time": "0:18:00", "remaining_time": "0:08:28"} | |
| {"current_steps": 180, "total_steps": 250, "loss": 0.0975, "lr": 3.7230863870929964e-05, "epoch": 0.33994334277620397, "percentage": 72.0, "elapsed_time": "0:19:04", "remaining_time": "0:07:24"} | |
| {"current_steps": 190, "total_steps": 250, "loss": 0.0975, "lr": 2.7969097511209308e-05, "epoch": 0.3588290840415486, "percentage": 76.0, "elapsed_time": "0:20:06", "remaining_time": "0:06:21"} | |
| {"current_steps": 200, "total_steps": 250, "loss": 0.0968, "lr": 1.9843301512912327e-05, "epoch": 0.3777148253068933, "percentage": 80.0, "elapsed_time": "0:21:09", "remaining_time": "0:05:17"} | |
| {"current_steps": 210, "total_steps": 250, "loss": 0.0974, "lr": 1.2981624533047432e-05, "epoch": 0.39660056657223797, "percentage": 84.0, "elapsed_time": "0:22:13", "remaining_time": "0:04:13"} | |
| {"current_steps": 220, "total_steps": 250, "loss": 0.0979, "lr": 7.492279316554207e-06, "epoch": 0.4154863078375826, "percentage": 88.0, "elapsed_time": "0:23:15", "remaining_time": "0:03:10"} | |
| {"current_steps": 230, "total_steps": 250, "loss": 0.0998, "lr": 3.461836116672612e-06, "epoch": 0.4343720491029273, "percentage": 92.0, "elapsed_time": "0:24:18", "remaining_time": "0:02:06"} | |
| {"current_steps": 240, "total_steps": 250, "loss": 0.096, "lr": 9.538574303348813e-07, "epoch": 0.45325779036827196, "percentage": 96.0, "elapsed_time": "0:25:21", "remaining_time": "0:01:03"} | |
| {"current_steps": 250, "total_steps": 250, "loss": 0.0987, "lr": 7.895579618388827e-09, "epoch": 0.4721435316336166, "percentage": 100.0, "elapsed_time": "0:26:24", "remaining_time": "0:00:00"} | |
| {"current_steps": 250, "total_steps": 250, "epoch": 0.4721435316336166, "percentage": 100.0, "elapsed_time": "0:26:25", "remaining_time": "0:00:00"} | |