Text Generation
Transformers
Safetensors
qwen2
llama-factory
full
Generated from Trainer
conversational
text-generation-inference
Instructions to use adpretko/ml815-model9 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use adpretko/ml815-model9 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="adpretko/ml815-model9") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("adpretko/ml815-model9") model = AutoModelForCausalLM.from_pretrained("adpretko/ml815-model9", device_map="auto") 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=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use adpretko/ml815-model9 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "adpretko/ml815-model9" # 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-model9", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/adpretko/ml815-model9
- SGLang
How to use adpretko/ml815-model9 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-model9" \ --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-model9", "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-model9" \ --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-model9", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use adpretko/ml815-model9 with Docker Model Runner:
docker model run hf.co/adpretko/ml815-model9
Download trainer_state.json from adpretko/ml815-model9: direct link, hf CLI and curl.
- Browser
- Download file 6.22 kB
-
https://huggingface.co/adpretko/ml815-model9/resolve/main/trainer_state.json
- Command line
-
hf download hf://adpretko/ml815-model9/trainer_state.json
-
curl -L -o trainer_state.json https://huggingface.co/adpretko/ml815-model9/resolve/main/trainer_state.json
6.22 kB
| { | |
| "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.9168577194213867, | |
| "learning_rate": 5.806451612903226e-06, | |
| "loss": 0.598, | |
| "step": 10 | |
| }, | |
| { | |
| "epoch": 0.06472491909385113, | |
| "grad_norm": 1.8480807542800903, | |
| "learning_rate": 1.2258064516129034e-05, | |
| "loss": 0.2239, | |
| "step": 20 | |
| }, | |
| { | |
| "epoch": 0.0970873786407767, | |
| "grad_norm": 0.9047099351882935, | |
| "learning_rate": 1.870967741935484e-05, | |
| "loss": 0.1209, | |
| "step": 30 | |
| }, | |
| { | |
| "epoch": 0.12944983818770225, | |
| "grad_norm": 0.9319924712181091, | |
| "learning_rate": 1.9959162014075553e-05, | |
| "loss": 0.0953, | |
| "step": 40 | |
| }, | |
| { | |
| "epoch": 0.16181229773462782, | |
| "grad_norm": 0.5594499707221985, | |
| "learning_rate": 1.9793829188147406e-05, | |
| "loss": 0.0801, | |
| "step": 50 | |
| }, | |
| { | |
| "epoch": 0.1941747572815534, | |
| "grad_norm": 0.6101599931716919, | |
| "learning_rate": 1.9503556665478066e-05, | |
| "loss": 0.082, | |
| "step": 60 | |
| }, | |
| { | |
| "epoch": 0.22653721682847897, | |
| "grad_norm": 0.6025184392929077, | |
| "learning_rate": 1.9092047447238775e-05, | |
| "loss": 0.0635, | |
| "step": 70 | |
| }, | |
| { | |
| "epoch": 0.2588996763754045, | |
| "grad_norm": 0.5912179946899414, | |
| "learning_rate": 1.856455114887056e-05, | |
| "loss": 0.0586, | |
| "step": 80 | |
| }, | |
| { | |
| "epoch": 0.2912621359223301, | |
| "grad_norm": 0.460332989692688, | |
| "learning_rate": 1.792779703083777e-05, | |
| "loss": 0.067, | |
| "step": 90 | |
| }, | |
| { | |
| "epoch": 0.32362459546925565, | |
| "grad_norm": 0.4907929003238678, | |
| "learning_rate": 1.7189908153577473e-05, | |
| "loss": 0.0597, | |
| "step": 100 | |
| }, | |
| { | |
| "epoch": 0.3559870550161812, | |
| "grad_norm": 0.522468090057373, | |
| "learning_rate": 1.636029775176862e-05, | |
| "loss": 0.0579, | |
| "step": 110 | |
| }, | |
| { | |
| "epoch": 0.3883495145631068, | |
| "grad_norm": 0.43857327103614807, | |
| "learning_rate": 1.544954914987238e-05, | |
| "loss": 0.0568, | |
| "step": 120 | |
| }, | |
| { | |
| "epoch": 0.42071197411003236, | |
| "grad_norm": 0.36459407210350037, | |
| "learning_rate": 1.4469280750858854e-05, | |
| "loss": 0.0527, | |
| "step": 130 | |
| }, | |
| { | |
| "epoch": 0.45307443365695793, | |
| "grad_norm": 0.39144057035446167, | |
| "learning_rate": 1.3431997820456592e-05, | |
| "loss": 0.0491, | |
| "step": 140 | |
| }, | |
| { | |
| "epoch": 0.4854368932038835, | |
| "grad_norm": 0.45727330446243286, | |
| "learning_rate": 1.2350932957710322e-05, | |
| "loss": 0.0473, | |
| "step": 150 | |
| }, | |
| { | |
| "epoch": 0.517799352750809, | |
| "grad_norm": 0.4593789875507355, | |
| "learning_rate": 1.1239877286961123e-05, | |
| "loss": 0.0463, | |
| "step": 160 | |
| }, | |
| { | |
| "epoch": 0.5501618122977346, | |
| "grad_norm": 0.36281996965408325, | |
| "learning_rate": 1.01130045247298e-05, | |
| "loss": 0.05, | |
| "step": 170 | |
| }, | |
| { | |
| "epoch": 0.5825242718446602, | |
| "grad_norm": 0.46488189697265625, | |
| "learning_rate": 8.98469016587892e-06, | |
| "loss": 0.0441, | |
| "step": 180 | |
| }, | |
| { | |
| "epoch": 0.6148867313915858, | |
| "grad_norm": 0.39195364713668823, | |
| "learning_rate": 7.869328095692313e-06, | |
| "loss": 0.0429, | |
| "step": 190 | |
| }, | |
| { | |
| "epoch": 0.6472491909385113, | |
| "grad_norm": 0.3537571430206299, | |
| "learning_rate": 6.781146967348283e-06, | |
| "loss": 0.0432, | |
| "step": 200 | |
| }, | |
| { | |
| "epoch": 0.6796116504854369, | |
| "grad_norm": 0.35812804102897644, | |
| "learning_rate": 5.7340286872557515e-06, | |
| "loss": 0.0365, | |
| "step": 210 | |
| }, | |
| { | |
| "epoch": 0.7119741100323624, | |
| "grad_norm": 0.29698875546455383, | |
| "learning_rate": 4.7413313238324556e-06, | |
| "loss": 0.0422, | |
| "step": 220 | |
| }, | |
| { | |
| "epoch": 0.7443365695792881, | |
| "grad_norm": 0.37994715571403503, | |
| "learning_rate": 3.815718698874672e-06, | |
| "loss": 0.0425, | |
| "step": 230 | |
| }, | |
| { | |
| "epoch": 0.7766990291262136, | |
| "grad_norm": 0.3461650013923645, | |
| "learning_rate": 2.9689988354181742e-06, | |
| "loss": 0.0384, | |
| "step": 240 | |
| }, | |
| { | |
| "epoch": 0.8090614886731392, | |
| "grad_norm": 0.30156540870666504, | |
| "learning_rate": 2.211973323008041e-06, | |
| "loss": 0.0422, | |
| "step": 250 | |
| }, | |
| { | |
| "epoch": 0.8414239482200647, | |
| "grad_norm": 0.44933223724365234, | |
| "learning_rate": 1.5542995220217961e-06, | |
| "loss": 0.0415, | |
| "step": 260 | |
| }, | |
| { | |
| "epoch": 0.8737864077669902, | |
| "grad_norm": 0.3253950774669647, | |
| "learning_rate": 1.0043673649027519e-06, | |
| "loss": 0.038, | |
| "step": 270 | |
| }, | |
| { | |
| "epoch": 0.9061488673139159, | |
| "grad_norm": 0.2673346996307373, | |
| "learning_rate": 5.691923259479093e-07, | |
| "loss": 0.038, | |
| "step": 280 | |
| }, | |
| { | |
| "epoch": 0.9385113268608414, | |
| "grad_norm": 0.2838808596134186, | |
| "learning_rate": 2.5432592503288e-07, | |
| "loss": 0.0382, | |
| "step": 290 | |
| }, | |
| { | |
| "epoch": 0.970873786407767, | |
| "grad_norm": 0.3232278823852539, | |
| "learning_rate": 6.378490697611761e-08, | |
| "loss": 0.0407, | |
| "step": 300 | |
| }, | |
| { | |
| "epoch": 1.0, | |
| "step": 309, | |
| "total_flos": 3.151751154761728e+17, | |
| "train_loss": 0.0763875040132251, | |
| "train_runtime": 2448.9622, | |
| "train_samples_per_second": 4.037, | |
| "train_steps_per_second": 0.126 | |
| } | |
| ], | |
| "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 | |
| } | |