Text Generation
Transformers
Safetensors
qwen2
llama-factory
full
Generated from Trainer
conversational
text-generation-inference
Instructions to use adpretko/ml815-model1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use adpretko/ml815-model1 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="adpretko/ml815-model1") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("adpretko/ml815-model1") model = AutoModelForCausalLM.from_pretrained("adpretko/ml815-model1") 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-model1 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "adpretko/ml815-model1" # 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-model1", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/adpretko/ml815-model1
- SGLang
How to use adpretko/ml815-model1 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-model1" \ --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-model1", "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-model1" \ --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-model1", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use adpretko/ml815-model1 with Docker Model Runner:
docker model run hf.co/adpretko/ml815-model1
| { | |
| "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.926347494125366, | |
| "learning_rate": 5.806451612903226e-06, | |
| "loss": 0.5976, | |
| "step": 10 | |
| }, | |
| { | |
| "epoch": 0.06472491909385113, | |
| "grad_norm": 1.8357148170471191, | |
| "learning_rate": 1.2258064516129034e-05, | |
| "loss": 0.222, | |
| "step": 20 | |
| }, | |
| { | |
| "epoch": 0.0970873786407767, | |
| "grad_norm": 1.0913752317428589, | |
| "learning_rate": 1.870967741935484e-05, | |
| "loss": 0.1162, | |
| "step": 30 | |
| }, | |
| { | |
| "epoch": 0.12944983818770225, | |
| "grad_norm": 0.9276040196418762, | |
| "learning_rate": 1.9959162014075553e-05, | |
| "loss": 0.092, | |
| "step": 40 | |
| }, | |
| { | |
| "epoch": 0.16181229773462782, | |
| "grad_norm": 0.5747660398483276, | |
| "learning_rate": 1.9793829188147406e-05, | |
| "loss": 0.078, | |
| "step": 50 | |
| }, | |
| { | |
| "epoch": 0.1941747572815534, | |
| "grad_norm": 0.619417667388916, | |
| "learning_rate": 1.9503556665478066e-05, | |
| "loss": 0.0807, | |
| "step": 60 | |
| }, | |
| { | |
| "epoch": 0.22653721682847897, | |
| "grad_norm": 0.611924946308136, | |
| "learning_rate": 1.9092047447238775e-05, | |
| "loss": 0.0632, | |
| "step": 70 | |
| }, | |
| { | |
| "epoch": 0.2588996763754045, | |
| "grad_norm": 0.5246961116790771, | |
| "learning_rate": 1.856455114887056e-05, | |
| "loss": 0.0598, | |
| "step": 80 | |
| }, | |
| { | |
| "epoch": 0.2912621359223301, | |
| "grad_norm": 0.4895159900188446, | |
| "learning_rate": 1.792779703083777e-05, | |
| "loss": 0.0669, | |
| "step": 90 | |
| }, | |
| { | |
| "epoch": 0.32362459546925565, | |
| "grad_norm": 0.5285359025001526, | |
| "learning_rate": 1.7189908153577473e-05, | |
| "loss": 0.06, | |
| "step": 100 | |
| }, | |
| { | |
| "epoch": 0.3559870550161812, | |
| "grad_norm": 0.542774498462677, | |
| "learning_rate": 1.636029775176862e-05, | |
| "loss": 0.0588, | |
| "step": 110 | |
| }, | |
| { | |
| "epoch": 0.3883495145631068, | |
| "grad_norm": 0.41997477412223816, | |
| "learning_rate": 1.544954914987238e-05, | |
| "loss": 0.0574, | |
| "step": 120 | |
| }, | |
| { | |
| "epoch": 0.42071197411003236, | |
| "grad_norm": 0.3513728678226471, | |
| "learning_rate": 1.4469280750858854e-05, | |
| "loss": 0.0529, | |
| "step": 130 | |
| }, | |
| { | |
| "epoch": 0.45307443365695793, | |
| "grad_norm": 0.3665269911289215, | |
| "learning_rate": 1.3431997820456592e-05, | |
| "loss": 0.0488, | |
| "step": 140 | |
| }, | |
| { | |
| "epoch": 0.4854368932038835, | |
| "grad_norm": 0.39934423565864563, | |
| "learning_rate": 1.2350932957710322e-05, | |
| "loss": 0.0467, | |
| "step": 150 | |
| }, | |
| { | |
| "epoch": 0.517799352750809, | |
| "grad_norm": 0.4407676160335541, | |
| "learning_rate": 1.1239877286961123e-05, | |
| "loss": 0.046, | |
| "step": 160 | |
| }, | |
| { | |
| "epoch": 0.5501618122977346, | |
| "grad_norm": 0.34131231904029846, | |
| "learning_rate": 1.01130045247298e-05, | |
| "loss": 0.0498, | |
| "step": 170 | |
| }, | |
| { | |
| "epoch": 0.5825242718446602, | |
| "grad_norm": 0.44269460439682007, | |
| "learning_rate": 8.98469016587892e-06, | |
| "loss": 0.0437, | |
| "step": 180 | |
| }, | |
| { | |
| "epoch": 0.6148867313915858, | |
| "grad_norm": 0.37352392077445984, | |
| "learning_rate": 7.869328095692313e-06, | |
| "loss": 0.0431, | |
| "step": 190 | |
| }, | |
| { | |
| "epoch": 0.6472491909385113, | |
| "grad_norm": 0.39660772681236267, | |
| "learning_rate": 6.781146967348283e-06, | |
| "loss": 0.0435, | |
| "step": 200 | |
| }, | |
| { | |
| "epoch": 0.6796116504854369, | |
| "grad_norm": 0.3542636036872864, | |
| "learning_rate": 5.7340286872557515e-06, | |
| "loss": 0.0368, | |
| "step": 210 | |
| }, | |
| { | |
| "epoch": 0.7119741100323624, | |
| "grad_norm": 0.3182332217693329, | |
| "learning_rate": 4.7413313238324556e-06, | |
| "loss": 0.0424, | |
| "step": 220 | |
| }, | |
| { | |
| "epoch": 0.7443365695792881, | |
| "grad_norm": 0.39352044463157654, | |
| "learning_rate": 3.815718698874672e-06, | |
| "loss": 0.0423, | |
| "step": 230 | |
| }, | |
| { | |
| "epoch": 0.7766990291262136, | |
| "grad_norm": 0.3279437720775604, | |
| "learning_rate": 2.9689988354181742e-06, | |
| "loss": 0.0385, | |
| "step": 240 | |
| }, | |
| { | |
| "epoch": 0.8090614886731392, | |
| "grad_norm": 0.33194735646247864, | |
| "learning_rate": 2.211973323008041e-06, | |
| "loss": 0.0426, | |
| "step": 250 | |
| }, | |
| { | |
| "epoch": 0.8414239482200647, | |
| "grad_norm": 0.4326941668987274, | |
| "learning_rate": 1.5542995220217961e-06, | |
| "loss": 0.0415, | |
| "step": 260 | |
| }, | |
| { | |
| "epoch": 0.8737864077669902, | |
| "grad_norm": 0.38563477993011475, | |
| "learning_rate": 1.0043673649027519e-06, | |
| "loss": 0.038, | |
| "step": 270 | |
| }, | |
| { | |
| "epoch": 0.9061488673139159, | |
| "grad_norm": 0.24755792319774628, | |
| "learning_rate": 5.691923259479093e-07, | |
| "loss": 0.0379, | |
| "step": 280 | |
| }, | |
| { | |
| "epoch": 0.9385113268608414, | |
| "grad_norm": 0.2887294888496399, | |
| "learning_rate": 2.5432592503288e-07, | |
| "loss": 0.0385, | |
| "step": 290 | |
| }, | |
| { | |
| "epoch": 0.970873786407767, | |
| "grad_norm": 0.36656224727630615, | |
| "learning_rate": 6.378490697611761e-08, | |
| "loss": 0.041, | |
| "step": 300 | |
| }, | |
| { | |
| "epoch": 1.0, | |
| "step": 309, | |
| "total_flos": 3.151751154761728e+17, | |
| "train_loss": 0.07604102896448092, | |
| "train_runtime": 2342.9995, | |
| "train_samples_per_second": 4.22, | |
| "train_steps_per_second": 0.132 | |
| } | |
| ], | |
| "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 | |
| } | |