Instructions to use FirstPotatoCoder/KhmerLLM_full with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use FirstPotatoCoder/KhmerLLM_full with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="FirstPotatoCoder/KhmerLLM_full") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("FirstPotatoCoder/KhmerLLM_full") model = AutoModelForCausalLM.from_pretrained("FirstPotatoCoder/KhmerLLM_full") 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=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use FirstPotatoCoder/KhmerLLM_full with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "FirstPotatoCoder/KhmerLLM_full" # 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_full", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/FirstPotatoCoder/KhmerLLM_full
- SGLang
How to use FirstPotatoCoder/KhmerLLM_full 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_full" \ --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_full", "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_full" \ --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_full", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use FirstPotatoCoder/KhmerLLM_full with Docker Model Runner:
docker model run hf.co/FirstPotatoCoder/KhmerLLM_full
Upload losses.json with huggingface_hub
Browse files- losses.json +57 -0
losses.json
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"epoch_1": {
|
| 3 |
+
"train": [
|
| 4 |
+
12.986456871032715,
|
| 5 |
+
8.242310097591936,
|
| 6 |
+
6.103185503936011,
|
| 7 |
+
4.625102449842721,
|
| 8 |
+
4.073614676530696,
|
| 9 |
+
5.594025807735348,
|
| 10 |
+
3.14445710261006,
|
| 11 |
+
2.8427582374289018,
|
| 12 |
+
2.6573131159317396,
|
| 13 |
+
2.5581798939665488,
|
| 14 |
+
2.487692332070721,
|
| 15 |
+
2.4221809978327475,
|
| 16 |
+
2.3744151996186944,
|
| 17 |
+
2.3369295461118713,
|
| 18 |
+
2.2947631965984,
|
| 19 |
+
2.2793206945923736,
|
| 20 |
+
2.235823899064182,
|
| 21 |
+
2.202956847711043,
|
| 22 |
+
2.1905788616700606,
|
| 23 |
+
2.1760405711891235,
|
| 24 |
+
2.147873802815587,
|
| 25 |
+
2.1373383323023143,
|
| 26 |
+
2.115493049109278,
|
| 27 |
+
2.093070942508288,
|
| 28 |
+
2.069805771457262,
|
| 29 |
+
2.071623833317402,
|
| 30 |
+
2.041620403281913,
|
| 31 |
+
2.0338821135276604,
|
| 32 |
+
2.027073261363447,
|
| 33 |
+
2.0037578815271044,
|
| 34 |
+
1.9955629202945173,
|
| 35 |
+
1.9807603455772085,
|
| 36 |
+
1.9763815410866226,
|
| 37 |
+
1.9703653786793227,
|
| 38 |
+
1.9624102986548557,
|
| 39 |
+
1.9408840425743545,
|
| 40 |
+
1.9266109708912116,
|
| 41 |
+
1.936342299477128,
|
| 42 |
+
1.9150524722643134,
|
| 43 |
+
1.9088118700941732,
|
| 44 |
+
1.9036740681356634,
|
| 45 |
+
1.878493307641715,
|
| 46 |
+
1.880729602585154,
|
| 47 |
+
1.8804447402638838,
|
| 48 |
+
1.8716453221218645,
|
| 49 |
+
1.8813945673713999,
|
| 50 |
+
1.8745401167672529,
|
| 51 |
+
1.8709548193561145,
|
| 52 |
+
1.8608385588511949,
|
| 53 |
+
1.8541411072754663,
|
| 54 |
+
1.8461788908509182
|
| 55 |
+
]
|
| 56 |
+
}
|
| 57 |
+
}
|