Instructions to use FirstPotatoCoder/KhmerLLM_instruct_e3 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use FirstPotatoCoder/KhmerLLM_instruct_e3 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="FirstPotatoCoder/KhmerLLM_instruct_e3") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("FirstPotatoCoder/KhmerLLM_instruct_e3") model = AutoModelForCausalLM.from_pretrained("FirstPotatoCoder/KhmerLLM_instruct_e3", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use FirstPotatoCoder/KhmerLLM_instruct_e3 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "FirstPotatoCoder/KhmerLLM_instruct_e3" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "FirstPotatoCoder/KhmerLLM_instruct_e3", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/FirstPotatoCoder/KhmerLLM_instruct_e3
- SGLang
How to use FirstPotatoCoder/KhmerLLM_instruct_e3 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 "FirstPotatoCoder/KhmerLLM_instruct_e3" \ --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": "FirstPotatoCoder/KhmerLLM_instruct_e3", "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 "FirstPotatoCoder/KhmerLLM_instruct_e3" \ --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": "FirstPotatoCoder/KhmerLLM_instruct_e3", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use FirstPotatoCoder/KhmerLLM_instruct_e3 with Docker Model Runner:
docker model run hf.co/FirstPotatoCoder/KhmerLLM_instruct_e3
Upload losses.json with huggingface_hub
Browse files- losses.json +146 -0
losses.json
ADDED
|
@@ -0,0 +1,146 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"epoch_1": {
|
| 3 |
+
"train": [
|
| 4 |
+
5.271936893463135,
|
| 5 |
+
1.9609320962147132,
|
| 6 |
+
1.9740553322323673,
|
| 7 |
+
2.139290197198657,
|
| 8 |
+
2.247907088415043,
|
| 9 |
+
2.285330520112168,
|
| 10 |
+
2.2319649446604624,
|
| 11 |
+
2.243296389228891,
|
| 12 |
+
2.2536917634157314,
|
| 13 |
+
2.209015501663089,
|
| 14 |
+
2.226236399967928,
|
| 15 |
+
2.206922415883054,
|
| 16 |
+
2.178474697989185,
|
| 17 |
+
2.1676215355385198,
|
| 18 |
+
2.1512051139756836,
|
| 19 |
+
2.1398139397638873,
|
| 20 |
+
2.1226689175551607,
|
| 21 |
+
2.073150171520742,
|
| 22 |
+
2.1201384635516316,
|
| 23 |
+
2.076858220269551,
|
| 24 |
+
2.097028753606955
|
| 25 |
+
],
|
| 26 |
+
"valid": [
|
| 27 |
+
1.1291518211364746,
|
| 28 |
+
2.067204667814784,
|
| 29 |
+
2.0799241820668994,
|
| 30 |
+
2.0836550180902953,
|
| 31 |
+
2.0208084501694366,
|
| 32 |
+
2.046902624599834,
|
| 33 |
+
2.048392039174816,
|
| 34 |
+
2.0523822885502425,
|
| 35 |
+
2.1093318052164953,
|
| 36 |
+
2.045438961157781,
|
| 37 |
+
2.0284024898543556,
|
| 38 |
+
2.0823902644132026,
|
| 39 |
+
2.068561091735789,
|
| 40 |
+
2.04120002024074,
|
| 41 |
+
2.110343912481808,
|
| 42 |
+
2.0642544958074738,
|
| 43 |
+
2.1391414723468825,
|
| 44 |
+
2.0862888607688728,
|
| 45 |
+
2.0415287822371653,
|
| 46 |
+
2.102056995770777,
|
| 47 |
+
2.0660724703349995
|
| 48 |
+
]
|
| 49 |
+
},
|
| 50 |
+
"epoch_2": {
|
| 51 |
+
"train": [
|
| 52 |
+
1.1250828504562378,
|
| 53 |
+
1.6866733151915911,
|
| 54 |
+
1.6711480116874382,
|
| 55 |
+
1.6840804061046928,
|
| 56 |
+
1.68249223763249,
|
| 57 |
+
1.70828488573583,
|
| 58 |
+
1.6997642467125647,
|
| 59 |
+
1.6986137225569502,
|
| 60 |
+
1.680408867195601,
|
| 61 |
+
1.709202501557868,
|
| 62 |
+
1.7080492489857952,
|
| 63 |
+
1.6736224725515254,
|
| 64 |
+
1.68992514700654,
|
| 65 |
+
1.6553177957586642,
|
| 66 |
+
1.6625943104862362,
|
| 67 |
+
1.6536764682874687,
|
| 68 |
+
1.6486711747365426,
|
| 69 |
+
1.6435150859902639,
|
| 70 |
+
1.6376260894954808,
|
| 71 |
+
1.6223357702366303,
|
| 72 |
+
1.6161062715675782
|
| 73 |
+
],
|
| 74 |
+
"valid": [
|
| 75 |
+
0.7614306211471558,
|
| 76 |
+
1.9096627201417553,
|
| 77 |
+
1.9389004737931965,
|
| 78 |
+
1.9154423076390314,
|
| 79 |
+
1.8614522431739837,
|
| 80 |
+
1.88988713721812,
|
| 81 |
+
1.8942808100932451,
|
| 82 |
+
1.904625305431424,
|
| 83 |
+
1.9441249492957111,
|
| 84 |
+
1.880363641469651,
|
| 85 |
+
1.8738720467448688,
|
| 86 |
+
1.9273116527401448,
|
| 87 |
+
1.9208439817446719,
|
| 88 |
+
1.8939266498324536,
|
| 89 |
+
1.9537830798118287,
|
| 90 |
+
1.8849086070242036,
|
| 91 |
+
1.9721769031009746,
|
| 92 |
+
1.9307436939654694,
|
| 93 |
+
1.8900886493037408,
|
| 94 |
+
1.9701839389683176,
|
| 95 |
+
1.899274163146436
|
| 96 |
+
]
|
| 97 |
+
},
|
| 98 |
+
"epoch_3": {
|
| 99 |
+
"train": [
|
| 100 |
+
1.1513729095458984,
|
| 101 |
+
1.06434254796949,
|
| 102 |
+
1.0766028918489512,
|
| 103 |
+
1.0793594382199887,
|
| 104 |
+
1.0857450410320952,
|
| 105 |
+
1.0669733012674023,
|
| 106 |
+
1.0846032033410125,
|
| 107 |
+
1.081505761809043,
|
| 108 |
+
1.0676487164250952,
|
| 109 |
+
1.0597493878905535,
|
| 110 |
+
1.0608423910563107,
|
| 111 |
+
1.069292292146742,
|
| 112 |
+
1.044115708225306,
|
| 113 |
+
1.0520662938722887,
|
| 114 |
+
1.041138549011226,
|
| 115 |
+
1.0357335644956627,
|
| 116 |
+
1.022188963157729,
|
| 117 |
+
1.0211489132882372,
|
| 118 |
+
1.0403658007963787,
|
| 119 |
+
1.0455147695060618,
|
| 120 |
+
1.0299970061184738
|
| 121 |
+
],
|
| 122 |
+
"valid": [
|
| 123 |
+
0.4119639992713928,
|
| 124 |
+
1.9787316288331616,
|
| 125 |
+
1.9904993831431457,
|
| 126 |
+
1.976195783329554,
|
| 127 |
+
1.9031735930889278,
|
| 128 |
+
1.9484034901052827,
|
| 129 |
+
1.9585362489232545,
|
| 130 |
+
1.9623318482827778,
|
| 131 |
+
1.998200187551658,
|
| 132 |
+
1.9331881993170474,
|
| 133 |
+
1.935898186022791,
|
| 134 |
+
1.9807388553601255,
|
| 135 |
+
1.978663128138495,
|
| 136 |
+
1.966193325392647,
|
| 137 |
+
2.0159074038607088,
|
| 138 |
+
1.926523634689389,
|
| 139 |
+
2.0204776920406537,
|
| 140 |
+
1.9855956211969426,
|
| 141 |
+
1.9435239793456554,
|
| 142 |
+
2.030767936896915,
|
| 143 |
+
1.9467219725081222
|
| 144 |
+
]
|
| 145 |
+
}
|
| 146 |
+
}
|