Text Generation
Transformers
Safetensors
qwen2
llama-factory
full
Generated from Trainer
conversational
text-generation-inference
Instructions to use adpretko/ml815-model5 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use adpretko/ml815-model5 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="adpretko/ml815-model5") 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-model5") model = AutoModelForCausalLM.from_pretrained("adpretko/ml815-model5", 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-model5 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "adpretko/ml815-model5" # 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-model5", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/adpretko/ml815-model5
- SGLang
How to use adpretko/ml815-model5 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-model5" \ --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-model5", "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-model5" \ --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-model5", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use adpretko/ml815-model5 with Docker Model Runner:
docker model run hf.co/adpretko/ml815-model5
Download trainer_state.json from adpretko/ml815-model5: direct link, hf CLI and curl.
- Browser
- Download file 3.6 kB
-
https://huggingface.co/adpretko/ml815-model5/resolve/main/trainer_state.json
- Command line
-
hf download hf://adpretko/ml815-model5/trainer_state.json
-
curl -L -o trainer_state.json https://huggingface.co/adpretko/ml815-model5/resolve/main/trainer_state.json
3.6 kB
| { | |
| "best_global_step": null, | |
| "best_metric": null, | |
| "best_model_checkpoint": null, | |
| "epoch": 1.0, | |
| "eval_steps": 500, | |
| "global_step": 155, | |
| "is_hyper_param_search": false, | |
| "is_local_process_zero": true, | |
| "is_world_process_zero": true, | |
| "log_history": [ | |
| { | |
| "epoch": 0.06472491909385113, | |
| "grad_norm": 3.3882408142089844, | |
| "learning_rate": 1.125e-05, | |
| "loss": 0.5392, | |
| "step": 10 | |
| }, | |
| { | |
| "epoch": 0.12944983818770225, | |
| "grad_norm": 1.0038115978240967, | |
| "learning_rate": 1.99770217861636e-05, | |
| "loss": 0.1627, | |
| "step": 20 | |
| }, | |
| { | |
| "epoch": 0.1941747572815534, | |
| "grad_norm": 0.6339080929756165, | |
| "learning_rate": 1.9571451231564523e-05, | |
| "loss": 0.0999, | |
| "step": 30 | |
| }, | |
| { | |
| "epoch": 0.2588996763754045, | |
| "grad_norm": 0.41973698139190674, | |
| "learning_rate": 1.86790270392905e-05, | |
| "loss": 0.0729, | |
| "step": 40 | |
| }, | |
| { | |
| "epoch": 0.32362459546925565, | |
| "grad_norm": 0.46516239643096924, | |
| "learning_rate": 1.734514253098589e-05, | |
| "loss": 0.0725, | |
| "step": 50 | |
| }, | |
| { | |
| "epoch": 0.3883495145631068, | |
| "grad_norm": 0.4504494369029999, | |
| "learning_rate": 1.5637645988943008e-05, | |
| "loss": 0.0641, | |
| "step": 60 | |
| }, | |
| { | |
| "epoch": 0.45307443365695793, | |
| "grad_norm": 0.3512699007987976, | |
| "learning_rate": 1.3643389540670963e-05, | |
| "loss": 0.0564, | |
| "step": 70 | |
| }, | |
| { | |
| "epoch": 0.517799352750809, | |
| "grad_norm": 0.3928837180137634, | |
| "learning_rate": 1.1463811409361667e-05, | |
| "loss": 0.0511, | |
| "step": 80 | |
| }, | |
| { | |
| "epoch": 0.5825242718446602, | |
| "grad_norm": 0.325100839138031, | |
| "learning_rate": 9.209776239900453e-06, | |
| "loss": 0.0515, | |
| "step": 90 | |
| }, | |
| { | |
| "epoch": 0.6472491909385113, | |
| "grad_norm": 0.308345764875412, | |
| "learning_rate": 6.995935948193294e-06, | |
| "loss": 0.0483, | |
| "step": 100 | |
| }, | |
| { | |
| "epoch": 0.7119741100323624, | |
| "grad_norm": 0.3138153553009033, | |
| "learning_rate": 4.934897930252887e-06, | |
| "loss": 0.0442, | |
| "step": 110 | |
| }, | |
| { | |
| "epoch": 0.7766990291262136, | |
| "grad_norm": 0.3170579671859741, | |
| "learning_rate": 3.1314972661673572e-06, | |
| "loss": 0.0456, | |
| "step": 120 | |
| }, | |
| { | |
| "epoch": 0.8414239482200647, | |
| "grad_norm": 0.3011327385902405, | |
| "learning_rate": 1.6774642643563955e-06, | |
| "loss": 0.0476, | |
| "step": 130 | |
| }, | |
| { | |
| "epoch": 0.9061488673139159, | |
| "grad_norm": 0.24439357221126556, | |
| "learning_rate": 6.467585824627886e-07, | |
| "loss": 0.043, | |
| "step": 140 | |
| }, | |
| { | |
| "epoch": 0.970873786407767, | |
| "grad_norm": 0.27276483178138733, | |
| "learning_rate": 9.180725568338045e-08, | |
| "loss": 0.0447, | |
| "step": 150 | |
| }, | |
| { | |
| "epoch": 1.0, | |
| "step": 155, | |
| "total_flos": 3.151751208448819e+17, | |
| "train_loss": 0.0941466587205087, | |
| "train_runtime": 2000.2548, | |
| "train_samples_per_second": 4.943, | |
| "train_steps_per_second": 0.077 | |
| } | |
| ], | |
| "logging_steps": 10, | |
| "max_steps": 155, | |
| "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.151751208448819e+17, | |
| "train_batch_size": 8, | |
| "trial_name": null, | |
| "trial_params": null | |
| } | |