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
| { | |
| "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": 4.205862998962402, | |
| "learning_rate": 5.806451612903226e-06, | |
| "loss": 0.6004, | |
| "step": 10 | |
| }, | |
| { | |
| "epoch": 0.06472491909385113, | |
| "grad_norm": 2.067194700241089, | |
| "learning_rate": 1.2258064516129034e-05, | |
| "loss": 0.2484, | |
| "step": 20 | |
| }, | |
| { | |
| "epoch": 0.0970873786407767, | |
| "grad_norm": 0.9206975102424622, | |
| "learning_rate": 1.870967741935484e-05, | |
| "loss": 0.1354, | |
| "step": 30 | |
| }, | |
| { | |
| "epoch": 0.12944983818770225, | |
| "grad_norm": 0.8155682682991028, | |
| "learning_rate": 1.9959162014075553e-05, | |
| "loss": 0.1027, | |
| "step": 40 | |
| }, | |
| { | |
| "epoch": 0.16181229773462782, | |
| "grad_norm": 0.6652464270591736, | |
| "learning_rate": 1.9793829188147406e-05, | |
| "loss": 0.0861, | |
| "step": 50 | |
| }, | |
| { | |
| "epoch": 0.1941747572815534, | |
| "grad_norm": 0.6949710845947266, | |
| "learning_rate": 1.9503556665478066e-05, | |
| "loss": 0.0882, | |
| "step": 60 | |
| }, | |
| { | |
| "epoch": 0.22653721682847897, | |
| "grad_norm": 0.5845817923545837, | |
| "learning_rate": 1.9092047447238775e-05, | |
| "loss": 0.0684, | |
| "step": 70 | |
| }, | |
| { | |
| "epoch": 0.2588996763754045, | |
| "grad_norm": 0.5173789262771606, | |
| "learning_rate": 1.856455114887056e-05, | |
| "loss": 0.0639, | |
| "step": 80 | |
| }, | |
| { | |
| "epoch": 0.2912621359223301, | |
| "grad_norm": 0.593817412853241, | |
| "learning_rate": 1.792779703083777e-05, | |
| "loss": 0.0718, | |
| "step": 90 | |
| }, | |
| { | |
| "epoch": 0.32362459546925565, | |
| "grad_norm": 0.6153833866119385, | |
| "learning_rate": 1.7189908153577473e-05, | |
| "loss": 0.0653, | |
| "step": 100 | |
| }, | |
| { | |
| "epoch": 0.3559870550161812, | |
| "grad_norm": 0.6375450491905212, | |
| "learning_rate": 1.636029775176862e-05, | |
| "loss": 0.0632, | |
| "step": 110 | |
| }, | |
| { | |
| "epoch": 0.3883495145631068, | |
| "grad_norm": 0.4619232416152954, | |
| "learning_rate": 1.544954914987238e-05, | |
| "loss": 0.0614, | |
| "step": 120 | |
| }, | |
| { | |
| "epoch": 0.42071197411003236, | |
| "grad_norm": 0.4041443467140198, | |
| "learning_rate": 1.4469280750858854e-05, | |
| "loss": 0.0572, | |
| "step": 130 | |
| }, | |
| { | |
| "epoch": 0.45307443365695793, | |
| "grad_norm": 0.5032212734222412, | |
| "learning_rate": 1.3431997820456592e-05, | |
| "loss": 0.0532, | |
| "step": 140 | |
| }, | |
| { | |
| "epoch": 0.4854368932038835, | |
| "grad_norm": 0.4844492971897125, | |
| "learning_rate": 1.2350932957710322e-05, | |
| "loss": 0.0512, | |
| "step": 150 | |
| }, | |
| { | |
| "epoch": 0.517799352750809, | |
| "grad_norm": 0.5413029789924622, | |
| "learning_rate": 1.1239877286961123e-05, | |
| "loss": 0.0499, | |
| "step": 160 | |
| }, | |
| { | |
| "epoch": 0.5501618122977346, | |
| "grad_norm": 0.48275595903396606, | |
| "learning_rate": 1.01130045247298e-05, | |
| "loss": 0.0545, | |
| "step": 170 | |
| }, | |
| { | |
| "epoch": 0.5825242718446602, | |
| "grad_norm": 0.5238805413246155, | |
| "learning_rate": 8.98469016587892e-06, | |
| "loss": 0.048, | |
| "step": 180 | |
| }, | |
| { | |
| "epoch": 0.6148867313915858, | |
| "grad_norm": 0.5326752066612244, | |
| "learning_rate": 7.869328095692313e-06, | |
| "loss": 0.0476, | |
| "step": 190 | |
| }, | |
| { | |
| "epoch": 0.6472491909385113, | |
| "grad_norm": 0.4399051368236542, | |
| "learning_rate": 6.781146967348283e-06, | |
| "loss": 0.0483, | |
| "step": 200 | |
| }, | |
| { | |
| "epoch": 0.6796116504854369, | |
| "grad_norm": 0.42469847202301025, | |
| "learning_rate": 5.7340286872557515e-06, | |
| "loss": 0.0406, | |
| "step": 210 | |
| }, | |
| { | |
| "epoch": 0.7119741100323624, | |
| "grad_norm": 0.3958876430988312, | |
| "learning_rate": 4.7413313238324556e-06, | |
| "loss": 0.0469, | |
| "step": 220 | |
| }, | |
| { | |
| "epoch": 0.7443365695792881, | |
| "grad_norm": 0.49159300327301025, | |
| "learning_rate": 3.815718698874672e-06, | |
| "loss": 0.0473, | |
| "step": 230 | |
| }, | |
| { | |
| "epoch": 0.7766990291262136, | |
| "grad_norm": 0.41017910838127136, | |
| "learning_rate": 2.9689988354181742e-06, | |
| "loss": 0.0432, | |
| "step": 240 | |
| }, | |
| { | |
| "epoch": 0.8090614886731392, | |
| "grad_norm": 0.3570820391178131, | |
| "learning_rate": 2.211973323008041e-06, | |
| "loss": 0.0475, | |
| "step": 250 | |
| }, | |
| { | |
| "epoch": 0.8414239482200647, | |
| "grad_norm": 0.4732098877429962, | |
| "learning_rate": 1.5542995220217961e-06, | |
| "loss": 0.0459, | |
| "step": 260 | |
| }, | |
| { | |
| "epoch": 0.8737864077669902, | |
| "grad_norm": 0.42088189721107483, | |
| "learning_rate": 1.0043673649027519e-06, | |
| "loss": 0.0424, | |
| "step": 270 | |
| }, | |
| { | |
| "epoch": 0.9061488673139159, | |
| "grad_norm": 0.3217940926551819, | |
| "learning_rate": 5.691923259479093e-07, | |
| "loss": 0.0425, | |
| "step": 280 | |
| }, | |
| { | |
| "epoch": 0.9385113268608414, | |
| "grad_norm": 0.3519341051578522, | |
| "learning_rate": 2.5432592503288e-07, | |
| "loss": 0.043, | |
| "step": 290 | |
| }, | |
| { | |
| "epoch": 0.970873786407767, | |
| "grad_norm": 0.4310944378376007, | |
| "learning_rate": 6.378490697611761e-08, | |
| "loss": 0.0453, | |
| "step": 300 | |
| }, | |
| { | |
| "epoch": 1.0, | |
| "step": 309, | |
| "total_flos": 3.151751154761728e+17, | |
| "train_loss": 0.08207544491514805, | |
| "train_runtime": 2093.6474, | |
| "train_samples_per_second": 4.722, | |
| "train_steps_per_second": 0.148 | |
| } | |
| ], | |
| "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 | |
| } | |