Instructions to use YousefBarakat/Model with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use YousefBarakat/Model with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen2.5-1.5B-Instruct") model = PeftModel.from_pretrained(base_model, "YousefBarakat/Model") - Transformers
How to use YousefBarakat/Model with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="YousefBarakat/Model") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("YousefBarakat/Model", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use YousefBarakat/Model with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "YousefBarakat/Model" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "YousefBarakat/Model", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/YousefBarakat/Model
- SGLang
How to use YousefBarakat/Model 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 "YousefBarakat/Model" \ --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": "YousefBarakat/Model", "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 "YousefBarakat/Model" \ --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": "YousefBarakat/Model", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use YousefBarakat/Model with Docker Model Runner:
docker model run hf.co/YousefBarakat/Model
Download trainer_state.json from YousefBarakat/Model: direct link, hf CLI and curl.
- Browser
- Download file 10.5 kB
-
https://huggingface.co/YousefBarakat/Model/resolve/main/trainer_state.json
- Command line
-
hf download hf://YousefBarakat/Model/trainer_state.json
-
curl -L -o trainer_state.json https://huggingface.co/YousefBarakat/Model/resolve/main/trainer_state.json
10.5 kB
| { | |
| "best_global_step": null, | |
| "best_metric": null, | |
| "best_model_checkpoint": null, | |
| "epoch": 1.0, | |
| "eval_steps": 50, | |
| "global_step": 410, | |
| "is_hyper_param_search": false, | |
| "is_local_process_zero": true, | |
| "is_world_process_zero": true, | |
| "log_history": [ | |
| { | |
| "epoch": 0.02442002442002442, | |
| "grad_norm": 1.8804959058761597, | |
| "learning_rate": 2.1951219512195124e-05, | |
| "loss": 1.0383675575256348, | |
| "step": 10 | |
| }, | |
| { | |
| "epoch": 0.04884004884004884, | |
| "grad_norm": 1.260099172592163, | |
| "learning_rate": 4.634146341463415e-05, | |
| "loss": 0.9142965316772461, | |
| "step": 20 | |
| }, | |
| { | |
| "epoch": 0.07326007326007326, | |
| "grad_norm": 2.452146291732788, | |
| "learning_rate": 7.073170731707317e-05, | |
| "loss": 0.5925925731658935, | |
| "step": 30 | |
| }, | |
| { | |
| "epoch": 0.09768009768009768, | |
| "grad_norm": 0.9088484644889832, | |
| "learning_rate": 9.51219512195122e-05, | |
| "loss": 0.625553035736084, | |
| "step": 40 | |
| }, | |
| { | |
| "epoch": 0.1221001221001221, | |
| "grad_norm": 1.1221411228179932, | |
| "learning_rate": 9.98840691294159e-05, | |
| "loss": 0.7184983253479004, | |
| "step": 50 | |
| }, | |
| { | |
| "epoch": 0.1221001221001221, | |
| "eval_loss": 0.4379732608795166, | |
| "eval_runtime": 155.1212, | |
| "eval_samples_per_second": 1.173, | |
| "eval_steps_per_second": 1.173, | |
| "step": 50 | |
| }, | |
| { | |
| "epoch": 0.14652014652014653, | |
| "grad_norm": 1.48092520236969, | |
| "learning_rate": 9.941402118901744e-05, | |
| "loss": 0.6436511516571045, | |
| "step": 60 | |
| }, | |
| { | |
| "epoch": 0.17094017094017094, | |
| "grad_norm": 0.9403982162475586, | |
| "learning_rate": 9.858601294888213e-05, | |
| "loss": 0.6321167945861816, | |
| "step": 70 | |
| }, | |
| { | |
| "epoch": 0.19536019536019536, | |
| "grad_norm": 1.9959934949874878, | |
| "learning_rate": 9.740604258666668e-05, | |
| "loss": 0.4339743137359619, | |
| "step": 80 | |
| }, | |
| { | |
| "epoch": 0.21978021978021978, | |
| "grad_norm": 0.8679758310317993, | |
| "learning_rate": 9.58826579301814e-05, | |
| "loss": 0.7650653839111328, | |
| "step": 90 | |
| }, | |
| { | |
| "epoch": 0.2442002442002442, | |
| "grad_norm": 0.8135587573051453, | |
| "learning_rate": 9.402689453603815e-05, | |
| "loss": 0.9344680786132813, | |
| "step": 100 | |
| }, | |
| { | |
| "epoch": 0.2442002442002442, | |
| "eval_loss": 0.410927414894104, | |
| "eval_runtime": 155.7582, | |
| "eval_samples_per_second": 1.168, | |
| "eval_steps_per_second": 1.168, | |
| "step": 100 | |
| }, | |
| { | |
| "epoch": 0.2686202686202686, | |
| "grad_norm": 0.9190899729728699, | |
| "learning_rate": 9.185219574693242e-05, | |
| "loss": 0.929171371459961, | |
| "step": 110 | |
| }, | |
| { | |
| "epoch": 0.29304029304029305, | |
| "grad_norm": 1.7113302946090698, | |
| "learning_rate": 8.937431530667328e-05, | |
| "loss": 0.8475244522094727, | |
| "step": 120 | |
| }, | |
| { | |
| "epoch": 0.31746031746031744, | |
| "grad_norm": 1.2021324634552002, | |
| "learning_rate": 8.661120323842751e-05, | |
| "loss": 0.7967288494110107, | |
| "step": 130 | |
| }, | |
| { | |
| "epoch": 0.3418803418803419, | |
| "grad_norm": 1.2183983325958252, | |
| "learning_rate": 8.358287581288822e-05, | |
| "loss": 0.6628508567810059, | |
| "step": 140 | |
| }, | |
| { | |
| "epoch": 0.3663003663003663, | |
| "grad_norm": 0.6963383555412292, | |
| "learning_rate": 8.03112705483319e-05, | |
| "loss": 0.35836048126220704, | |
| "step": 150 | |
| }, | |
| { | |
| "epoch": 0.3663003663003663, | |
| "eval_loss": 0.3939921259880066, | |
| "eval_runtime": 155.1823, | |
| "eval_samples_per_second": 1.173, | |
| "eval_steps_per_second": 1.173, | |
| "step": 150 | |
| }, | |
| { | |
| "epoch": 0.3907203907203907, | |
| "grad_norm": 1.2565363645553589, | |
| "learning_rate": 7.682008729295833e-05, | |
| "loss": 0.6145974636077881, | |
| "step": 160 | |
| }, | |
| { | |
| "epoch": 0.41514041514041516, | |
| "grad_norm": 0.4023746848106384, | |
| "learning_rate": 7.313461654072973e-05, | |
| "loss": 0.462252140045166, | |
| "step": 170 | |
| }, | |
| { | |
| "epoch": 0.43956043956043955, | |
| "grad_norm": 0.8940127491950989, | |
| "learning_rate": 6.92815562244068e-05, | |
| "loss": 0.895142936706543, | |
| "step": 180 | |
| }, | |
| { | |
| "epoch": 0.463980463980464, | |
| "grad_norm": 0.9050699472427368, | |
| "learning_rate": 6.528881831295188e-05, | |
| "loss": 0.5885900020599365, | |
| "step": 190 | |
| }, | |
| { | |
| "epoch": 0.4884004884004884, | |
| "grad_norm": 1.7588568925857544, | |
| "learning_rate": 6.118532661432812e-05, | |
| "loss": 0.6375821590423584, | |
| "step": 200 | |
| }, | |
| { | |
| "epoch": 0.4884004884004884, | |
| "eval_loss": 0.3821566104888916, | |
| "eval_runtime": 155.428, | |
| "eval_samples_per_second": 1.171, | |
| "eval_steps_per_second": 1.171, | |
| "step": 200 | |
| }, | |
| { | |
| "epoch": 0.5128205128205128, | |
| "grad_norm": 0.8788589239120483, | |
| "learning_rate": 5.700080724843147e-05, | |
| "loss": 0.5496622562408447, | |
| "step": 210 | |
| }, | |
| { | |
| "epoch": 0.5372405372405372, | |
| "grad_norm": 1.0257195234298706, | |
| "learning_rate": 5.2765573307992036e-05, | |
| "loss": 0.7461658000946045, | |
| "step": 220 | |
| }, | |
| { | |
| "epoch": 0.5616605616605617, | |
| "grad_norm": 1.6746125221252441, | |
| "learning_rate": 4.851030526738321e-05, | |
| "loss": 0.5698539733886718, | |
| "step": 230 | |
| }, | |
| { | |
| "epoch": 0.5860805860805861, | |
| "grad_norm": 0.8949107527732849, | |
| "learning_rate": 4.4265828730079987e-05, | |
| "loss": 0.5721668243408203, | |
| "step": 240 | |
| }, | |
| { | |
| "epoch": 0.6105006105006106, | |
| "grad_norm": 2.384493350982666, | |
| "learning_rate": 4.0062891124787e-05, | |
| "loss": 0.7134846687316895, | |
| "step": 250 | |
| }, | |
| { | |
| "epoch": 0.6105006105006106, | |
| "eval_loss": 0.36719319224357605, | |
| "eval_runtime": 155.0828, | |
| "eval_samples_per_second": 1.174, | |
| "eval_steps_per_second": 1.174, | |
| "step": 250 | |
| }, | |
| { | |
| "epoch": 0.6349206349206349, | |
| "grad_norm": 1.2632209062576294, | |
| "learning_rate": 3.5931938967872766e-05, | |
| "loss": 0.7118762969970703, | |
| "step": 260 | |
| }, | |
| { | |
| "epoch": 0.6593406593406593, | |
| "grad_norm": 1.3680095672607422, | |
| "learning_rate": 3.1902897305644095e-05, | |
| "loss": 0.8658300399780273, | |
| "step": 270 | |
| }, | |
| { | |
| "epoch": 0.6837606837606838, | |
| "grad_norm": 1.2788431644439697, | |
| "learning_rate": 2.8004952934203838e-05, | |
| "loss": 0.7101179122924804, | |
| "step": 280 | |
| }, | |
| { | |
| "epoch": 0.7081807081807082, | |
| "grad_norm": 1.044674277305603, | |
| "learning_rate": 2.4266342967269552e-05, | |
| "loss": 0.5662980079650879, | |
| "step": 290 | |
| }, | |
| { | |
| "epoch": 0.7326007326007326, | |
| "grad_norm": 1.589475154876709, | |
| "learning_rate": 2.071415028359026e-05, | |
| "loss": 0.5755983352661133, | |
| "step": 300 | |
| }, | |
| { | |
| "epoch": 0.7326007326007326, | |
| "eval_loss": 0.355652779340744, | |
| "eval_runtime": 155.57, | |
| "eval_samples_per_second": 1.17, | |
| "eval_steps_per_second": 1.17, | |
| "step": 300 | |
| }, | |
| { | |
| "epoch": 0.757020757020757, | |
| "grad_norm": 1.370431900024414, | |
| "learning_rate": 1.7374107335760936e-05, | |
| "loss": 0.539859390258789, | |
| "step": 310 | |
| }, | |
| { | |
| "epoch": 0.7814407814407814, | |
| "grad_norm": 0.995492160320282, | |
| "learning_rate": 1.427040974166427e-05, | |
| "loss": 0.2917079210281372, | |
| "step": 320 | |
| }, | |
| { | |
| "epoch": 0.8058608058608059, | |
| "grad_norm": 1.1896394491195679, | |
| "learning_rate": 1.1425541008902851e-05, | |
| "loss": 0.7617981433868408, | |
| "step": 330 | |
| }, | |
| { | |
| "epoch": 0.8302808302808303, | |
| "grad_norm": 2.3315072059631348, | |
| "learning_rate": 8.860109661935674e-06, | |
| "loss": 0.6248091697692871, | |
| "step": 340 | |
| }, | |
| { | |
| "epoch": 0.8547008547008547, | |
| "grad_norm": 0.6425564885139465, | |
| "learning_rate": 6.592699951787362e-06, | |
| "loss": 0.4457353115081787, | |
| "step": 350 | |
| }, | |
| { | |
| "epoch": 0.8547008547008547, | |
| "eval_loss": 0.35156095027923584, | |
| "eval_runtime": 155.323, | |
| "eval_samples_per_second": 1.172, | |
| "eval_steps_per_second": 1.172, | |
| "step": 350 | |
| }, | |
| { | |
| "epoch": 0.8791208791208791, | |
| "grad_norm": 1.164421796798706, | |
| "learning_rate": 4.639737229804403e-06, | |
| "loss": 0.36368584632873535, | |
| "step": 360 | |
| }, | |
| { | |
| "epoch": 0.9035409035409036, | |
| "grad_norm": 1.071614146232605, | |
| "learning_rate": 3.0153689607045845e-06, | |
| "loss": 0.5256676197052002, | |
| "step": 370 | |
| }, | |
| { | |
| "epoch": 0.927960927960928, | |
| "grad_norm": 0.6991368532180786, | |
| "learning_rate": 1.7313622368738014e-06, | |
| "loss": 0.5124877452850342, | |
| "step": 380 | |
| }, | |
| { | |
| "epoch": 0.9523809523809523, | |
| "grad_norm": 1.053227186203003, | |
| "learning_rate": 7.970185363271431e-07, | |
| "loss": 0.444692325592041, | |
| "step": 390 | |
| }, | |
| { | |
| "epoch": 0.9768009768009768, | |
| "grad_norm": 1.5848822593688965, | |
| "learning_rate": 2.1910634183644474e-07, | |
| "loss": 0.5859388828277587, | |
| "step": 400 | |
| }, | |
| { | |
| "epoch": 0.9768009768009768, | |
| "eval_loss": 0.3502028286457062, | |
| "eval_runtime": 155.3968, | |
| "eval_samples_per_second": 1.171, | |
| "eval_steps_per_second": 1.171, | |
| "step": 400 | |
| }, | |
| { | |
| "epoch": 1.0, | |
| "grad_norm": 0.7781813740730286, | |
| "learning_rate": 1.8121093383671738e-09, | |
| "loss": 0.6934732913970947, | |
| "step": 410 | |
| }, | |
| { | |
| "epoch": 1.0, | |
| "eval_loss": 0.3503350019454956, | |
| "eval_runtime": 155.368, | |
| "eval_samples_per_second": 1.171, | |
| "eval_steps_per_second": 1.171, | |
| "step": 410 | |
| }, | |
| { | |
| "epoch": 1.0, | |
| "step": 410, | |
| "total_flos": 6337444903649280.0, | |
| "train_loss": 0.6454218102664482, | |
| "train_runtime": 5611.1366, | |
| "train_samples_per_second": 0.292, | |
| "train_steps_per_second": 0.073 | |
| } | |
| ], | |
| "logging_steps": 10, | |
| "max_steps": 410, | |
| "num_input_tokens_seen": 0, | |
| "num_train_epochs": 1, | |
| "save_steps": 200, | |
| "stateful_callbacks": { | |
| "TrainerControl": { | |
| "args": { | |
| "should_epoch_stop": false, | |
| "should_evaluate": false, | |
| "should_log": false, | |
| "should_save": true, | |
| "should_training_stop": true | |
| }, | |
| "attributes": {} | |
| } | |
| }, | |
| "total_flos": 6337444903649280.0, | |
| "train_batch_size": 1, | |
| "trial_name": null, | |
| "trial_params": null | |
| } | |