Text Generation
Transformers
Safetensors
qwen2
llama-factory
full
Generated from Trainer
conversational
text-generation-inference
Instructions to use adpretko/ml815-model3 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use adpretko/ml815-model3 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="adpretko/ml815-model3") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("adpretko/ml815-model3") model = AutoModelForCausalLM.from_pretrained("adpretko/ml815-model3") 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-model3 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "adpretko/ml815-model3" # 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-model3", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/adpretko/ml815-model3
- SGLang
How to use adpretko/ml815-model3 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-model3" \ --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-model3", "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-model3" \ --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-model3", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use adpretko/ml815-model3 with Docker Model Runner:
docker model run hf.co/adpretko/ml815-model3
| { | |
| "best_global_step": null, | |
| "best_metric": null, | |
| "best_model_checkpoint": null, | |
| "epoch": 1.0, | |
| "eval_steps": 500, | |
| "global_step": 309, | |
| "is_hyper_param_search": false, | |
| "is_local_process_zero": true, | |
| "is_world_process_zero": true, | |
| "log_history": [ | |
| { | |
| "epoch": 0.032362459546925564, | |
| "grad_norm": 3.9228668212890625, | |
| "learning_rate": 5.806451612903226e-06, | |
| "loss": 0.598, | |
| "step": 10 | |
| }, | |
| { | |
| "epoch": 0.06472491909385113, | |
| "grad_norm": 1.8410780429840088, | |
| "learning_rate": 1.2258064516129034e-05, | |
| "loss": 0.2221, | |
| "step": 20 | |
| }, | |
| { | |
| "epoch": 0.0970873786407767, | |
| "grad_norm": 1.0678160190582275, | |
| "learning_rate": 1.870967741935484e-05, | |
| "loss": 0.1172, | |
| "step": 30 | |
| }, | |
| { | |
| "epoch": 0.12944983818770225, | |
| "grad_norm": 0.8716842532157898, | |
| "learning_rate": 1.9959162014075553e-05, | |
| "loss": 0.0926, | |
| "step": 40 | |
| }, | |
| { | |
| "epoch": 0.16181229773462782, | |
| "grad_norm": 0.5705822706222534, | |
| "learning_rate": 1.9793829188147406e-05, | |
| "loss": 0.0779, | |
| "step": 50 | |
| }, | |
| { | |
| "epoch": 0.1941747572815534, | |
| "grad_norm": 0.6189916133880615, | |
| "learning_rate": 1.9503556665478066e-05, | |
| "loss": 0.081, | |
| "step": 60 | |
| }, | |
| { | |
| "epoch": 0.22653721682847897, | |
| "grad_norm": 0.5710780620574951, | |
| "learning_rate": 1.9092047447238775e-05, | |
| "loss": 0.0633, | |
| "step": 70 | |
| }, | |
| { | |
| "epoch": 0.2588996763754045, | |
| "grad_norm": 0.5347579717636108, | |
| "learning_rate": 1.856455114887056e-05, | |
| "loss": 0.0606, | |
| "step": 80 | |
| }, | |
| { | |
| "epoch": 0.2912621359223301, | |
| "grad_norm": 0.46864503622055054, | |
| "learning_rate": 1.792779703083777e-05, | |
| "loss": 0.0667, | |
| "step": 90 | |
| }, | |
| { | |
| "epoch": 0.32362459546925565, | |
| "grad_norm": 0.5220317244529724, | |
| "learning_rate": 1.7189908153577473e-05, | |
| "loss": 0.0595, | |
| "step": 100 | |
| }, | |
| { | |
| "epoch": 0.3559870550161812, | |
| "grad_norm": 0.5476987361907959, | |
| "learning_rate": 1.636029775176862e-05, | |
| "loss": 0.0587, | |
| "step": 110 | |
| }, | |
| { | |
| "epoch": 0.3883495145631068, | |
| "grad_norm": 0.5268711447715759, | |
| "learning_rate": 1.544954914987238e-05, | |
| "loss": 0.0569, | |
| "step": 120 | |
| }, | |
| { | |
| "epoch": 0.42071197411003236, | |
| "grad_norm": 0.3479042053222656, | |
| "learning_rate": 1.4469280750858854e-05, | |
| "loss": 0.0531, | |
| "step": 130 | |
| }, | |
| { | |
| "epoch": 0.45307443365695793, | |
| "grad_norm": 0.3988036811351776, | |
| "learning_rate": 1.3431997820456592e-05, | |
| "loss": 0.0493, | |
| "step": 140 | |
| }, | |
| { | |
| "epoch": 0.4854368932038835, | |
| "grad_norm": 0.42685505747795105, | |
| "learning_rate": 1.2350932957710322e-05, | |
| "loss": 0.0468, | |
| "step": 150 | |
| }, | |
| { | |
| "epoch": 0.517799352750809, | |
| "grad_norm": 0.4328019917011261, | |
| "learning_rate": 1.1239877286961123e-05, | |
| "loss": 0.0458, | |
| "step": 160 | |
| }, | |
| { | |
| "epoch": 0.5501618122977346, | |
| "grad_norm": 0.3526838719844818, | |
| "learning_rate": 1.01130045247298e-05, | |
| "loss": 0.0496, | |
| "step": 170 | |
| }, | |
| { | |
| "epoch": 0.5825242718446602, | |
| "grad_norm": 0.4596581757068634, | |
| "learning_rate": 8.98469016587892e-06, | |
| "loss": 0.0435, | |
| "step": 180 | |
| }, | |
| { | |
| "epoch": 0.6148867313915858, | |
| "grad_norm": 0.38202300667762756, | |
| "learning_rate": 7.869328095692313e-06, | |
| "loss": 0.0427, | |
| "step": 190 | |
| }, | |
| { | |
| "epoch": 0.6472491909385113, | |
| "grad_norm": 0.37778717279434204, | |
| "learning_rate": 6.781146967348283e-06, | |
| "loss": 0.0432, | |
| "step": 200 | |
| }, | |
| { | |
| "epoch": 0.6796116504854369, | |
| "grad_norm": 0.3589198589324951, | |
| "learning_rate": 5.7340286872557515e-06, | |
| "loss": 0.0365, | |
| "step": 210 | |
| }, | |
| { | |
| "epoch": 0.7119741100323624, | |
| "grad_norm": 0.43407490849494934, | |
| "learning_rate": 4.7413313238324556e-06, | |
| "loss": 0.0424, | |
| "step": 220 | |
| }, | |
| { | |
| "epoch": 0.7443365695792881, | |
| "grad_norm": 0.4162500500679016, | |
| "learning_rate": 3.815718698874672e-06, | |
| "loss": 0.0428, | |
| "step": 230 | |
| }, | |
| { | |
| "epoch": 0.7766990291262136, | |
| "grad_norm": 0.3115518391132355, | |
| "learning_rate": 2.9689988354181742e-06, | |
| "loss": 0.0386, | |
| "step": 240 | |
| }, | |
| { | |
| "epoch": 0.8090614886731392, | |
| "grad_norm": 0.3344900906085968, | |
| "learning_rate": 2.211973323008041e-06, | |
| "loss": 0.0424, | |
| "step": 250 | |
| }, | |
| { | |
| "epoch": 0.8414239482200647, | |
| "grad_norm": 0.41753143072128296, | |
| "learning_rate": 1.5542995220217961e-06, | |
| "loss": 0.0416, | |
| "step": 260 | |
| }, | |
| { | |
| "epoch": 0.8737864077669902, | |
| "grad_norm": 0.3205048143863678, | |
| "learning_rate": 1.0043673649027519e-06, | |
| "loss": 0.0382, | |
| "step": 270 | |
| }, | |
| { | |
| "epoch": 0.9061488673139159, | |
| "grad_norm": 0.2584291398525238, | |
| "learning_rate": 5.691923259479093e-07, | |
| "loss": 0.0378, | |
| "step": 280 | |
| }, | |
| { | |
| "epoch": 0.9385113268608414, | |
| "grad_norm": 0.2823968231678009, | |
| "learning_rate": 2.5432592503288e-07, | |
| "loss": 0.0381, | |
| "step": 290 | |
| }, | |
| { | |
| "epoch": 0.970873786407767, | |
| "grad_norm": 0.33297494053840637, | |
| "learning_rate": 6.378490697611761e-08, | |
| "loss": 0.041, | |
| "step": 300 | |
| }, | |
| { | |
| "epoch": 1.0, | |
| "step": 309, | |
| "total_flos": 3.151751154761728e+17, | |
| "train_loss": 0.07607651446436602, | |
| "train_runtime": 2123.9724, | |
| "train_samples_per_second": 4.655, | |
| "train_steps_per_second": 0.145 | |
| } | |
| ], | |
| "logging_steps": 10, | |
| "max_steps": 309, | |
| "num_input_tokens_seen": 0, | |
| "num_train_epochs": 1, | |
| "save_steps": 100, | |
| "stateful_callbacks": { | |
| "TrainerControl": { | |
| "args": { | |
| "should_epoch_stop": false, | |
| "should_evaluate": false, | |
| "should_log": false, | |
| "should_save": true, | |
| "should_training_stop": true | |
| }, | |
| "attributes": {} | |
| } | |
| }, | |
| "total_flos": 3.151751154761728e+17, | |
| "train_batch_size": 8, | |
| "trial_name": null, | |
| "trial_params": null | |
| } | |