Text Generation
Transformers
Safetensors
qwen2
llama-factory
full
Generated from Trainer
conversational
text-generation-inference
Instructions to use adpretko/ml815-model2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use adpretko/ml815-model2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="adpretko/ml815-model2") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("adpretko/ml815-model2") model = AutoModelForCausalLM.from_pretrained("adpretko/ml815-model2") 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 adpretko/ml815-model2 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "adpretko/ml815-model2" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "adpretko/ml815-model2", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/adpretko/ml815-model2
- SGLang
How to use adpretko/ml815-model2 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 "adpretko/ml815-model2" \ --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": "adpretko/ml815-model2", "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 "adpretko/ml815-model2" \ --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": "adpretko/ml815-model2", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use adpretko/ml815-model2 with Docker Model Runner:
docker model run hf.co/adpretko/ml815-model2
File size: 5,956 Bytes
51d152e 57edab5 bb06e6a 301c187 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | {"current_steps": 10, "total_steps": 309, "loss": 0.6004, "lr": 5.806451612903226e-06, "epoch": 0.032362459546925564, "percentage": 3.24, "elapsed_time": "0:01:08", "remaining_time": "0:34:16"}
{"current_steps": 20, "total_steps": 309, "loss": 0.2484, "lr": 1.2258064516129034e-05, "epoch": 0.06472491909385113, "percentage": 6.47, "elapsed_time": "0:02:13", "remaining_time": "0:32:16"}
{"current_steps": 30, "total_steps": 309, "loss": 0.1354, "lr": 1.870967741935484e-05, "epoch": 0.0970873786407767, "percentage": 9.71, "elapsed_time": "0:03:12", "remaining_time": "0:29:54"}
{"current_steps": 40, "total_steps": 309, "loss": 0.1027, "lr": 1.9959162014075553e-05, "epoch": 0.12944983818770225, "percentage": 12.94, "elapsed_time": "0:04:21", "remaining_time": "0:29:16"}
{"current_steps": 50, "total_steps": 309, "loss": 0.0861, "lr": 1.9793829188147406e-05, "epoch": 0.16181229773462782, "percentage": 16.18, "elapsed_time": "0:05:28", "remaining_time": "0:28:22"}
{"current_steps": 60, "total_steps": 309, "loss": 0.0882, "lr": 1.9503556665478066e-05, "epoch": 0.1941747572815534, "percentage": 19.42, "elapsed_time": "0:06:35", "remaining_time": "0:27:23"}
{"current_steps": 70, "total_steps": 309, "loss": 0.0684, "lr": 1.9092047447238775e-05, "epoch": 0.22653721682847897, "percentage": 22.65, "elapsed_time": "0:07:39", "remaining_time": "0:26:09"}
{"current_steps": 80, "total_steps": 309, "loss": 0.0639, "lr": 1.856455114887056e-05, "epoch": 0.2588996763754045, "percentage": 25.89, "elapsed_time": "0:08:38", "remaining_time": "0:24:45"}
{"current_steps": 90, "total_steps": 309, "loss": 0.0718, "lr": 1.792779703083777e-05, "epoch": 0.2912621359223301, "percentage": 29.13, "elapsed_time": "0:09:41", "remaining_time": "0:23:36"}
{"current_steps": 100, "total_steps": 309, "loss": 0.0653, "lr": 1.7189908153577473e-05, "epoch": 0.32362459546925565, "percentage": 32.36, "elapsed_time": "0:10:43", "remaining_time": "0:22:25"}
{"current_steps": 110, "total_steps": 309, "loss": 0.0632, "lr": 1.636029775176862e-05, "epoch": 0.3559870550161812, "percentage": 35.6, "elapsed_time": "0:12:14", "remaining_time": "0:22:09"}
{"current_steps": 120, "total_steps": 309, "loss": 0.0614, "lr": 1.544954914987238e-05, "epoch": 0.3883495145631068, "percentage": 38.83, "elapsed_time": "0:13:21", "remaining_time": "0:21:03"}
{"current_steps": 130, "total_steps": 309, "loss": 0.0572, "lr": 1.4469280750858854e-05, "epoch": 0.42071197411003236, "percentage": 42.07, "elapsed_time": "0:14:21", "remaining_time": "0:19:45"}
{"current_steps": 140, "total_steps": 309, "loss": 0.0532, "lr": 1.3431997820456592e-05, "epoch": 0.45307443365695793, "percentage": 45.31, "elapsed_time": "0:15:25", "remaining_time": "0:18:37"}
{"current_steps": 150, "total_steps": 309, "loss": 0.0512, "lr": 1.2350932957710322e-05, "epoch": 0.4854368932038835, "percentage": 48.54, "elapsed_time": "0:16:23", "remaining_time": "0:17:22"}
{"current_steps": 160, "total_steps": 309, "loss": 0.0499, "lr": 1.1239877286961123e-05, "epoch": 0.517799352750809, "percentage": 51.78, "elapsed_time": "0:17:22", "remaining_time": "0:16:11"}
{"current_steps": 170, "total_steps": 309, "loss": 0.0545, "lr": 1.01130045247298e-05, "epoch": 0.5501618122977346, "percentage": 55.02, "elapsed_time": "0:18:29", "remaining_time": "0:15:07"}
{"current_steps": 180, "total_steps": 309, "loss": 0.048, "lr": 8.98469016587892e-06, "epoch": 0.5825242718446602, "percentage": 58.25, "elapsed_time": "0:19:31", "remaining_time": "0:13:59"}
{"current_steps": 190, "total_steps": 309, "loss": 0.0476, "lr": 7.869328095692313e-06, "epoch": 0.6148867313915858, "percentage": 61.49, "elapsed_time": "0:20:35", "remaining_time": "0:12:53"}
{"current_steps": 200, "total_steps": 309, "loss": 0.0483, "lr": 6.781146967348283e-06, "epoch": 0.6472491909385113, "percentage": 64.72, "elapsed_time": "0:21:36", "remaining_time": "0:11:46"}
{"current_steps": 210, "total_steps": 309, "loss": 0.0406, "lr": 5.7340286872557515e-06, "epoch": 0.6796116504854369, "percentage": 67.96, "elapsed_time": "0:22:58", "remaining_time": "0:10:50"}
{"current_steps": 220, "total_steps": 309, "loss": 0.0469, "lr": 4.7413313238324556e-06, "epoch": 0.7119741100323624, "percentage": 71.2, "elapsed_time": "0:24:07", "remaining_time": "0:09:45"}
{"current_steps": 230, "total_steps": 309, "loss": 0.0473, "lr": 3.815718698874672e-06, "epoch": 0.7443365695792881, "percentage": 74.43, "elapsed_time": "0:25:10", "remaining_time": "0:08:38"}
{"current_steps": 240, "total_steps": 309, "loss": 0.0432, "lr": 2.9689988354181742e-06, "epoch": 0.7766990291262136, "percentage": 77.67, "elapsed_time": "0:26:18", "remaining_time": "0:07:33"}
{"current_steps": 250, "total_steps": 309, "loss": 0.0475, "lr": 2.211973323008041e-06, "epoch": 0.8090614886731392, "percentage": 80.91, "elapsed_time": "0:27:18", "remaining_time": "0:06:26"}
{"current_steps": 260, "total_steps": 309, "loss": 0.0459, "lr": 1.5542995220217961e-06, "epoch": 0.8414239482200647, "percentage": 84.14, "elapsed_time": "0:28:24", "remaining_time": "0:05:21"}
{"current_steps": 270, "total_steps": 309, "loss": 0.0424, "lr": 1.0043673649027519e-06, "epoch": 0.8737864077669902, "percentage": 87.38, "elapsed_time": "0:29:27", "remaining_time": "0:04:15"}
{"current_steps": 280, "total_steps": 309, "loss": 0.0425, "lr": 5.691923259479093e-07, "epoch": 0.9061488673139159, "percentage": 90.61, "elapsed_time": "0:30:38", "remaining_time": "0:03:10"}
{"current_steps": 290, "total_steps": 309, "loss": 0.043, "lr": 2.5432592503288e-07, "epoch": 0.9385113268608414, "percentage": 93.85, "elapsed_time": "0:31:46", "remaining_time": "0:02:04"}
{"current_steps": 300, "total_steps": 309, "loss": 0.0453, "lr": 6.378490697611761e-08, "epoch": 0.970873786407767, "percentage": 97.09, "elapsed_time": "0:32:54", "remaining_time": "0:00:59"}
{"current_steps": 309, "total_steps": 309, "epoch": 1.0, "percentage": 100.0, "elapsed_time": "0:34:49", "remaining_time": "0:00:00"}
|