Instructions to use Sothiphak/sealion-khmer-lora with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use Sothiphak/sealion-khmer-lora with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("aisingapore/Llama-SEA-LION-v3-8B-IT") model = PeftModel.from_pretrained(base_model, "Sothiphak/sealion-khmer-lora") - Transformers
How to use Sothiphak/sealion-khmer-lora with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Sothiphak/sealion-khmer-lora") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("Sothiphak/sealion-khmer-lora", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Sothiphak/sealion-khmer-lora with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Sothiphak/sealion-khmer-lora" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Sothiphak/sealion-khmer-lora", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Sothiphak/sealion-khmer-lora
- SGLang
How to use Sothiphak/sealion-khmer-lora 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 "Sothiphak/sealion-khmer-lora" \ --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": "Sothiphak/sealion-khmer-lora", "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 "Sothiphak/sealion-khmer-lora" \ --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": "Sothiphak/sealion-khmer-lora", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Unsloth Desktop
- Docker Model Runner
How to use Sothiphak/sealion-khmer-lora with Docker Model Runner:
docker model run hf.co/Sothiphak/sealion-khmer-lora
| { | |
| "best_global_step": null, | |
| "best_metric": null, | |
| "best_model_checkpoint": null, | |
| "epoch": 1.0285148514851485, | |
| "eval_steps": 500, | |
| "global_step": 650, | |
| "is_hyper_param_search": false, | |
| "is_local_process_zero": true, | |
| "is_world_process_zero": true, | |
| "log_history": [ | |
| { | |
| "epoch": 0.015841584158415842, | |
| "grad_norm": 0.2681642174720764, | |
| "learning_rate": 0.00018, | |
| "loss": 0.5615610122680664, | |
| "step": 10 | |
| }, | |
| { | |
| "epoch": 0.031683168316831684, | |
| "grad_norm": 0.4051491618156433, | |
| "learning_rate": 0.00019904559915164368, | |
| "loss": 0.5492567539215087, | |
| "step": 20 | |
| }, | |
| { | |
| "epoch": 0.047524752475247525, | |
| "grad_norm": 0.3502402901649475, | |
| "learning_rate": 0.00019798515376458114, | |
| "loss": 0.599879789352417, | |
| "step": 30 | |
| }, | |
| { | |
| "epoch": 0.06336633663366337, | |
| "grad_norm": 0.29962077736854553, | |
| "learning_rate": 0.00019692470837751858, | |
| "loss": 0.6249649524688721, | |
| "step": 40 | |
| }, | |
| { | |
| "epoch": 0.07920792079207921, | |
| "grad_norm": 0.23971900343894958, | |
| "learning_rate": 0.00019586426299045598, | |
| "loss": 0.5784070014953613, | |
| "step": 50 | |
| }, | |
| { | |
| "epoch": 0.09504950495049505, | |
| "grad_norm": 0.2636028826236725, | |
| "learning_rate": 0.00019480381760339345, | |
| "loss": 0.6152547359466553, | |
| "step": 60 | |
| }, | |
| { | |
| "epoch": 0.11089108910891089, | |
| "grad_norm": 0.23000255227088928, | |
| "learning_rate": 0.00019374337221633088, | |
| "loss": 0.5608311653137207, | |
| "step": 70 | |
| }, | |
| { | |
| "epoch": 0.12673267326732673, | |
| "grad_norm": 0.2468724548816681, | |
| "learning_rate": 0.0001926829268292683, | |
| "loss": 0.5768645286560059, | |
| "step": 80 | |
| }, | |
| { | |
| "epoch": 0.14257425742574256, | |
| "grad_norm": 0.2919839322566986, | |
| "learning_rate": 0.00019162248144220573, | |
| "loss": 0.5808207035064697, | |
| "step": 90 | |
| }, | |
| { | |
| "epoch": 0.15841584158415842, | |
| "grad_norm": 0.3023220896720886, | |
| "learning_rate": 0.0001905620360551432, | |
| "loss": 0.5837886810302735, | |
| "step": 100 | |
| }, | |
| { | |
| "epoch": 0.17425742574257425, | |
| "grad_norm": 0.2673959732055664, | |
| "learning_rate": 0.0001895015906680806, | |
| "loss": 0.5960847854614257, | |
| "step": 110 | |
| }, | |
| { | |
| "epoch": 0.1900990099009901, | |
| "grad_norm": 0.2474275678396225, | |
| "learning_rate": 0.00018844114528101803, | |
| "loss": 0.5560206413269043, | |
| "step": 120 | |
| }, | |
| { | |
| "epoch": 0.20594059405940593, | |
| "grad_norm": 0.26754653453826904, | |
| "learning_rate": 0.0001873806998939555, | |
| "loss": 0.5669719696044921, | |
| "step": 130 | |
| }, | |
| { | |
| "epoch": 0.22178217821782178, | |
| "grad_norm": 0.27784964442253113, | |
| "learning_rate": 0.0001863202545068929, | |
| "loss": 0.5512593746185303, | |
| "step": 140 | |
| }, | |
| { | |
| "epoch": 0.2376237623762376, | |
| "grad_norm": 0.2117505818605423, | |
| "learning_rate": 0.00018525980911983034, | |
| "loss": 0.5637025833129883, | |
| "step": 150 | |
| }, | |
| { | |
| "epoch": 0.25346534653465347, | |
| "grad_norm": 0.27500784397125244, | |
| "learning_rate": 0.00018419936373276777, | |
| "loss": 0.5528223514556885, | |
| "step": 160 | |
| }, | |
| { | |
| "epoch": 0.2693069306930693, | |
| "grad_norm": 0.2535107731819153, | |
| "learning_rate": 0.0001831389183457052, | |
| "loss": 0.5803631782531739, | |
| "step": 170 | |
| }, | |
| { | |
| "epoch": 0.2851485148514851, | |
| "grad_norm": 0.24596087634563446, | |
| "learning_rate": 0.00018207847295864264, | |
| "loss": 0.5421345710754395, | |
| "step": 180 | |
| }, | |
| { | |
| "epoch": 0.300990099009901, | |
| "grad_norm": 0.25067201256752014, | |
| "learning_rate": 0.00018101802757158005, | |
| "loss": 0.5549107074737549, | |
| "step": 190 | |
| }, | |
| { | |
| "epoch": 0.31683168316831684, | |
| "grad_norm": 0.24968267977237701, | |
| "learning_rate": 0.0001799575821845175, | |
| "loss": 0.5486234188079834, | |
| "step": 200 | |
| }, | |
| { | |
| "epoch": 0.3326732673267327, | |
| "grad_norm": 0.24873675405979156, | |
| "learning_rate": 0.00017889713679745495, | |
| "loss": 0.5631236553192138, | |
| "step": 210 | |
| }, | |
| { | |
| "epoch": 0.3485148514851485, | |
| "grad_norm": 0.2490004599094391, | |
| "learning_rate": 0.00017783669141039236, | |
| "loss": 0.538916015625, | |
| "step": 220 | |
| }, | |
| { | |
| "epoch": 0.36435643564356435, | |
| "grad_norm": 0.193207785487175, | |
| "learning_rate": 0.00017677624602332982, | |
| "loss": 0.5809069156646729, | |
| "step": 230 | |
| }, | |
| { | |
| "epoch": 0.3801980198019802, | |
| "grad_norm": 0.28708136081695557, | |
| "learning_rate": 0.00017571580063626725, | |
| "loss": 0.5487487316131592, | |
| "step": 240 | |
| }, | |
| { | |
| "epoch": 0.39603960396039606, | |
| "grad_norm": 0.22866445779800415, | |
| "learning_rate": 0.00017465535524920466, | |
| "loss": 0.560062313079834, | |
| "step": 250 | |
| }, | |
| { | |
| "epoch": 0.41188118811881186, | |
| "grad_norm": 0.26000362634658813, | |
| "learning_rate": 0.0001735949098621421, | |
| "loss": 0.5541458129882812, | |
| "step": 260 | |
| }, | |
| { | |
| "epoch": 0.4277227722772277, | |
| "grad_norm": 0.20908737182617188, | |
| "learning_rate": 0.00017253446447507956, | |
| "loss": 0.5644277572631836, | |
| "step": 270 | |
| }, | |
| { | |
| "epoch": 0.44356435643564357, | |
| "grad_norm": 0.24441300332546234, | |
| "learning_rate": 0.00017147401908801697, | |
| "loss": 0.5405750274658203, | |
| "step": 280 | |
| }, | |
| { | |
| "epoch": 0.4594059405940594, | |
| "grad_norm": 0.23231364786624908, | |
| "learning_rate": 0.0001704135737009544, | |
| "loss": 0.5533739566802979, | |
| "step": 290 | |
| }, | |
| { | |
| "epoch": 0.4752475247524752, | |
| "grad_norm": 0.24838413298130035, | |
| "learning_rate": 0.00016935312831389186, | |
| "loss": 0.581938648223877, | |
| "step": 300 | |
| }, | |
| { | |
| "epoch": 0.4910891089108911, | |
| "grad_norm": 0.225566104054451, | |
| "learning_rate": 0.00016829268292682927, | |
| "loss": 0.5625068664550781, | |
| "step": 310 | |
| }, | |
| { | |
| "epoch": 0.5069306930693069, | |
| "grad_norm": 0.23124399781227112, | |
| "learning_rate": 0.0001672322375397667, | |
| "loss": 0.5552542209625244, | |
| "step": 320 | |
| }, | |
| { | |
| "epoch": 0.5227722772277228, | |
| "grad_norm": 0.21427498757839203, | |
| "learning_rate": 0.00016617179215270414, | |
| "loss": 0.5192074298858642, | |
| "step": 330 | |
| }, | |
| { | |
| "epoch": 0.5386138613861386, | |
| "grad_norm": 0.23526982963085175, | |
| "learning_rate": 0.00016511134676564158, | |
| "loss": 0.5778728008270264, | |
| "step": 340 | |
| }, | |
| { | |
| "epoch": 0.5544554455445545, | |
| "grad_norm": 0.25358083844184875, | |
| "learning_rate": 0.000164050901378579, | |
| "loss": 0.5592835903167724, | |
| "step": 350 | |
| }, | |
| { | |
| "epoch": 0.5702970297029702, | |
| "grad_norm": 0.2464510053396225, | |
| "learning_rate": 0.00016299045599151645, | |
| "loss": 0.5713228225708008, | |
| "step": 360 | |
| }, | |
| { | |
| "epoch": 0.5861386138613861, | |
| "grad_norm": 0.23266883194446564, | |
| "learning_rate": 0.00016193001060445388, | |
| "loss": 0.5558922290802002, | |
| "step": 370 | |
| }, | |
| { | |
| "epoch": 0.601980198019802, | |
| "grad_norm": 0.29434841871261597, | |
| "learning_rate": 0.00016086956521739132, | |
| "loss": 0.5865880489349365, | |
| "step": 380 | |
| }, | |
| { | |
| "epoch": 0.6178217821782178, | |
| "grad_norm": 0.20487159490585327, | |
| "learning_rate": 0.00015980911983032873, | |
| "loss": 0.5610895156860352, | |
| "step": 390 | |
| }, | |
| { | |
| "epoch": 0.6336633663366337, | |
| "grad_norm": 0.26936978101730347, | |
| "learning_rate": 0.0001587486744432662, | |
| "loss": 0.5487852096557617, | |
| "step": 400 | |
| }, | |
| { | |
| "epoch": 0.6495049504950495, | |
| "grad_norm": 0.2274005264043808, | |
| "learning_rate": 0.00015768822905620362, | |
| "loss": 0.5496184349060058, | |
| "step": 410 | |
| }, | |
| { | |
| "epoch": 0.6653465346534654, | |
| "grad_norm": 0.24373526871204376, | |
| "learning_rate": 0.00015662778366914103, | |
| "loss": 0.5408858299255371, | |
| "step": 420 | |
| }, | |
| { | |
| "epoch": 0.6811881188118812, | |
| "grad_norm": 0.3129599094390869, | |
| "learning_rate": 0.00015556733828207847, | |
| "loss": 0.5390897274017334, | |
| "step": 430 | |
| }, | |
| { | |
| "epoch": 0.697029702970297, | |
| "grad_norm": 0.28233346343040466, | |
| "learning_rate": 0.00015450689289501593, | |
| "loss": 0.5419738292694092, | |
| "step": 440 | |
| }, | |
| { | |
| "epoch": 0.7128712871287128, | |
| "grad_norm": 0.21026961505413055, | |
| "learning_rate": 0.00015344644750795334, | |
| "loss": 0.5432523727416992, | |
| "step": 450 | |
| }, | |
| { | |
| "epoch": 0.7287128712871287, | |
| "grad_norm": 0.1969085931777954, | |
| "learning_rate": 0.00015238600212089077, | |
| "loss": 0.5586908340454102, | |
| "step": 460 | |
| }, | |
| { | |
| "epoch": 0.7445544554455445, | |
| "grad_norm": 0.24481482803821564, | |
| "learning_rate": 0.00015132555673382823, | |
| "loss": 0.5176334857940674, | |
| "step": 470 | |
| }, | |
| { | |
| "epoch": 0.7603960396039604, | |
| "grad_norm": 0.2514127194881439, | |
| "learning_rate": 0.00015026511134676564, | |
| "loss": 0.5458994388580323, | |
| "step": 480 | |
| }, | |
| { | |
| "epoch": 0.7762376237623763, | |
| "grad_norm": 0.290608286857605, | |
| "learning_rate": 0.00014920466595970308, | |
| "loss": 0.5448351383209229, | |
| "step": 490 | |
| }, | |
| { | |
| "epoch": 0.7920792079207921, | |
| "grad_norm": 0.22577252984046936, | |
| "learning_rate": 0.0001481442205726405, | |
| "loss": 0.5721570491790772, | |
| "step": 500 | |
| }, | |
| { | |
| "epoch": 0.807920792079208, | |
| "grad_norm": 0.23058907687664032, | |
| "learning_rate": 0.00014708377518557795, | |
| "loss": 0.5574183940887452, | |
| "step": 510 | |
| }, | |
| { | |
| "epoch": 0.8237623762376237, | |
| "grad_norm": 0.1983114629983902, | |
| "learning_rate": 0.00014602332979851538, | |
| "loss": 0.540287446975708, | |
| "step": 520 | |
| }, | |
| { | |
| "epoch": 0.8396039603960396, | |
| "grad_norm": 0.2218492478132248, | |
| "learning_rate": 0.00014496288441145282, | |
| "loss": 0.5182662963867187, | |
| "step": 530 | |
| }, | |
| { | |
| "epoch": 0.8554455445544554, | |
| "grad_norm": 0.24610327184200287, | |
| "learning_rate": 0.00014390243902439025, | |
| "loss": 0.5651758193969727, | |
| "step": 540 | |
| }, | |
| { | |
| "epoch": 0.8712871287128713, | |
| "grad_norm": 0.22517655789852142, | |
| "learning_rate": 0.0001428419936373277, | |
| "loss": 0.5164387226104736, | |
| "step": 550 | |
| }, | |
| { | |
| "epoch": 0.8871287128712871, | |
| "grad_norm": 0.2436833679676056, | |
| "learning_rate": 0.00014178154825026512, | |
| "loss": 0.5450125217437745, | |
| "step": 560 | |
| }, | |
| { | |
| "epoch": 0.902970297029703, | |
| "grad_norm": 0.24090257287025452, | |
| "learning_rate": 0.00014072110286320256, | |
| "loss": 0.5317369937896729, | |
| "step": 570 | |
| }, | |
| { | |
| "epoch": 0.9188118811881189, | |
| "grad_norm": 0.25686290860176086, | |
| "learning_rate": 0.00013966065747614, | |
| "loss": 0.5516084671020508, | |
| "step": 580 | |
| }, | |
| { | |
| "epoch": 0.9346534653465347, | |
| "grad_norm": 0.23638945817947388, | |
| "learning_rate": 0.0001386002120890774, | |
| "loss": 0.514578914642334, | |
| "step": 590 | |
| }, | |
| { | |
| "epoch": 0.9504950495049505, | |
| "grad_norm": 0.23559114336967468, | |
| "learning_rate": 0.00013753976670201484, | |
| "loss": 0.5437835693359375, | |
| "step": 600 | |
| }, | |
| { | |
| "epoch": 0.9663366336633663, | |
| "grad_norm": 0.27141445875167847, | |
| "learning_rate": 0.0001364793213149523, | |
| "loss": 0.555320930480957, | |
| "step": 610 | |
| }, | |
| { | |
| "epoch": 0.9821782178217822, | |
| "grad_norm": 0.21413768827915192, | |
| "learning_rate": 0.0001354188759278897, | |
| "loss": 0.5468743324279786, | |
| "step": 620 | |
| }, | |
| { | |
| "epoch": 0.998019801980198, | |
| "grad_norm": 0.2012445032596588, | |
| "learning_rate": 0.00013435843054082714, | |
| "loss": 0.5468167781829834, | |
| "step": 630 | |
| }, | |
| { | |
| "epoch": 1.0126732673267327, | |
| "grad_norm": 0.1769125610589981, | |
| "learning_rate": 0.0001332979851537646, | |
| "loss": 0.5139318466186523, | |
| "step": 640 | |
| }, | |
| { | |
| "epoch": 1.0285148514851485, | |
| "grad_norm": 0.2236032634973526, | |
| "learning_rate": 0.000132237539766702, | |
| "loss": 0.533442497253418, | |
| "step": 650 | |
| } | |
| ], | |
| "logging_steps": 10, | |
| "max_steps": 1896, | |
| "num_input_tokens_seen": 0, | |
| "num_train_epochs": 3, | |
| "save_steps": 50, | |
| "stateful_callbacks": { | |
| "TrainerControl": { | |
| "args": { | |
| "should_epoch_stop": false, | |
| "should_evaluate": false, | |
| "should_log": false, | |
| "should_save": true, | |
| "should_training_stop": false | |
| }, | |
| "attributes": {} | |
| } | |
| }, | |
| "total_flos": 3.293370053971968e+17, | |
| "train_batch_size": 2, | |
| "trial_name": null, | |
| "trial_params": null | |
| } | |