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
Training in progress, step 300
Browse files- model.safetensors +1 -1
- trainer_log.jsonl +9 -0
model.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 3554214752
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:82f1a7a238b13c3b128d7e46f380c1f0443b9de3588cc6383841457ebefc4f4f
|
| 3 |
size 3554214752
|
trainer_log.jsonl
CHANGED
|
@@ -19,3 +19,12 @@
|
|
| 19 |
{"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"}
|
| 20 |
{"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"}
|
| 21 |
{"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"}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 19 |
{"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"}
|
| 20 |
{"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"}
|
| 21 |
{"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"}
|
| 22 |
+
{"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"}
|
| 23 |
+
{"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"}
|
| 24 |
+
{"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"}
|
| 25 |
+
{"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"}
|
| 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"}
|
| 27 |
+
{"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"}
|
| 28 |
+
{"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"}
|
| 29 |
+
{"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"}
|
| 30 |
+
{"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"}
|