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
File size: 10,180 Bytes
a934947 280f58d f320931 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 | {"current_steps": 10, "total_steps": 410, "loss": 1.0383675575256348, "lr": 2.1951219512195124e-05, "epoch": 0.02442002442002442, "percentage": 2.44, "elapsed_time": "0:01:07", "remaining_time": "0:45:01"}
{"current_steps": 20, "total_steps": 410, "loss": 0.9142965316772461, "lr": 4.634146341463415e-05, "epoch": 0.04884004884004884, "percentage": 4.88, "elapsed_time": "0:03:05", "remaining_time": "1:00:21"}
{"current_steps": 30, "total_steps": 410, "loss": 0.5925925731658935, "lr": 7.073170731707317e-05, "epoch": 0.07326007326007326, "percentage": 7.32, "elapsed_time": "0:04:14", "remaining_time": "0:53:40"}
{"current_steps": 40, "total_steps": 410, "loss": 0.625553035736084, "lr": 9.51219512195122e-05, "epoch": 0.09768009768009768, "percentage": 9.76, "elapsed_time": "0:05:43", "remaining_time": "0:52:55"}
{"current_steps": 50, "total_steps": 410, "loss": 0.7184983253479004, "lr": 9.98840691294159e-05, "epoch": 0.1221001221001221, "percentage": 12.2, "elapsed_time": "0:06:57", "remaining_time": "0:50:06"}
{"current_steps": 50, "total_steps": 410, "eval_loss": 0.4379732608795166, "epoch": 0.1221001221001221, "percentage": 12.2, "elapsed_time": "0:09:32", "remaining_time": "1:08:43"}
{"current_steps": 60, "total_steps": 410, "loss": 0.6436511516571045, "lr": 9.941402118901744e-05, "epoch": 0.14652014652014653, "percentage": 14.63, "elapsed_time": "0:11:09", "remaining_time": "1:05:08"}
{"current_steps": 70, "total_steps": 410, "loss": 0.6321167945861816, "lr": 9.858601294888213e-05, "epoch": 0.17094017094017094, "percentage": 17.07, "elapsed_time": "0:12:47", "remaining_time": "1:02:09"}
{"current_steps": 80, "total_steps": 410, "loss": 0.4339743137359619, "lr": 9.740604258666668e-05, "epoch": 0.19536019536019536, "percentage": 19.51, "elapsed_time": "0:14:04", "remaining_time": "0:58:04"}
{"current_steps": 90, "total_steps": 410, "loss": 0.7650653839111328, "lr": 9.58826579301814e-05, "epoch": 0.21978021978021978, "percentage": 21.95, "elapsed_time": "0:15:50", "remaining_time": "0:56:20"}
{"current_steps": 100, "total_steps": 410, "loss": 0.9344680786132813, "lr": 9.402689453603815e-05, "epoch": 0.2442002442002442, "percentage": 24.39, "elapsed_time": "0:17:48", "remaining_time": "0:55:12"}
{"current_steps": 100, "total_steps": 410, "eval_loss": 0.410927414894104, "epoch": 0.2442002442002442, "percentage": 24.39, "elapsed_time": "0:20:24", "remaining_time": "1:03:15"}
{"current_steps": 110, "total_steps": 410, "loss": 0.929171371459961, "lr": 9.185219574693242e-05, "epoch": 0.2686202686202686, "percentage": 26.83, "elapsed_time": "0:22:22", "remaining_time": "1:01:00"}
{"current_steps": 120, "total_steps": 410, "loss": 0.8475244522094727, "lr": 8.937431530667328e-05, "epoch": 0.29304029304029305, "percentage": 29.27, "elapsed_time": "0:24:35", "remaining_time": "0:59:26"}
{"current_steps": 130, "total_steps": 410, "loss": 0.7967288494110107, "lr": 8.661120323842751e-05, "epoch": 0.31746031746031744, "percentage": 31.71, "elapsed_time": "0:26:45", "remaining_time": "0:57:38"}
{"current_steps": 140, "total_steps": 410, "loss": 0.6628508567810059, "lr": 8.358287581288822e-05, "epoch": 0.3418803418803419, "percentage": 34.15, "elapsed_time": "0:28:15", "remaining_time": "0:54:30"}
{"current_steps": 150, "total_steps": 410, "loss": 0.35836048126220704, "lr": 8.03112705483319e-05, "epoch": 0.3663003663003663, "percentage": 36.59, "elapsed_time": "0:29:38", "remaining_time": "0:51:22"}
{"current_steps": 150, "total_steps": 410, "eval_loss": 0.3939921259880066, "epoch": 0.3663003663003663, "percentage": 36.59, "elapsed_time": "0:32:13", "remaining_time": "0:55:51"}
{"current_steps": 160, "total_steps": 410, "loss": 0.6145974636077881, "lr": 7.682008729295833e-05, "epoch": 0.3907203907203907, "percentage": 39.02, "elapsed_time": "0:33:40", "remaining_time": "0:52:37"}
{"current_steps": 170, "total_steps": 410, "loss": 0.462252140045166, "lr": 7.313461654072973e-05, "epoch": 0.41514041514041516, "percentage": 41.46, "elapsed_time": "0:35:25", "remaining_time": "0:50:00"}
{"current_steps": 180, "total_steps": 410, "loss": 0.895142936706543, "lr": 6.92815562244068e-05, "epoch": 0.43956043956043955, "percentage": 43.9, "elapsed_time": "0:37:36", "remaining_time": "0:48:02"}
{"current_steps": 190, "total_steps": 410, "loss": 0.5885900020599365, "lr": 6.528881831295188e-05, "epoch": 0.463980463980464, "percentage": 46.34, "elapsed_time": "0:39:01", "remaining_time": "0:45:11"}
{"current_steps": 200, "total_steps": 410, "loss": 0.6375821590423584, "lr": 6.118532661432812e-05, "epoch": 0.4884004884004884, "percentage": 48.78, "elapsed_time": "0:40:31", "remaining_time": "0:42:33"}
{"current_steps": 200, "total_steps": 410, "eval_loss": 0.3821566104888916, "epoch": 0.4884004884004884, "percentage": 48.78, "elapsed_time": "0:43:07", "remaining_time": "0:45:16"}
{"current_steps": 210, "total_steps": 410, "loss": 0.5496622562408447, "lr": 5.700080724843147e-05, "epoch": 0.5128205128205128, "percentage": 51.22, "elapsed_time": "0:44:54", "remaining_time": "0:42:46"}
{"current_steps": 220, "total_steps": 410, "loss": 0.7461658000946045, "lr": 5.2765573307992036e-05, "epoch": 0.5372405372405372, "percentage": 53.66, "elapsed_time": "0:46:43", "remaining_time": "0:40:21"}
{"current_steps": 230, "total_steps": 410, "loss": 0.5698539733886718, "lr": 4.851030526738321e-05, "epoch": 0.5616605616605617, "percentage": 56.1, "elapsed_time": "0:48:22", "remaining_time": "0:37:51"}
{"current_steps": 240, "total_steps": 410, "loss": 0.5721668243408203, "lr": 4.4265828730079987e-05, "epoch": 0.5860805860805861, "percentage": 58.54, "elapsed_time": "0:50:19", "remaining_time": "0:35:39"}
{"current_steps": 250, "total_steps": 410, "loss": 0.7134846687316895, "lr": 4.0062891124787e-05, "epoch": 0.6105006105006106, "percentage": 60.98, "elapsed_time": "0:51:56", "remaining_time": "0:33:14"}
{"current_steps": 250, "total_steps": 410, "eval_loss": 0.36719319224357605, "epoch": 0.6105006105006106, "percentage": 60.98, "elapsed_time": "0:54:31", "remaining_time": "0:34:53"}
{"current_steps": 260, "total_steps": 410, "loss": 0.7118762969970703, "lr": 3.5931938967872766e-05, "epoch": 0.6349206349206349, "percentage": 63.41, "elapsed_time": "0:56:48", "remaining_time": "0:32:46"}
{"current_steps": 270, "total_steps": 410, "loss": 0.8658300399780273, "lr": 3.1902897305644095e-05, "epoch": 0.6593406593406593, "percentage": 65.85, "elapsed_time": "0:59:05", "remaining_time": "0:30:38"}
{"current_steps": 280, "total_steps": 410, "loss": 0.7101179122924804, "lr": 2.8004952934203838e-05, "epoch": 0.6837606837606838, "percentage": 68.29, "elapsed_time": "1:00:49", "remaining_time": "0:28:14"}
{"current_steps": 290, "total_steps": 410, "loss": 0.5662980079650879, "lr": 2.4266342967269552e-05, "epoch": 0.7081807081807082, "percentage": 70.73, "elapsed_time": "1:02:04", "remaining_time": "0:25:41"}
{"current_steps": 300, "total_steps": 410, "loss": 0.5755983352661133, "lr": 2.071415028359026e-05, "epoch": 0.7326007326007326, "percentage": 73.17, "elapsed_time": "1:03:54", "remaining_time": "0:23:25"}
{"current_steps": 300, "total_steps": 410, "eval_loss": 0.355652779340744, "epoch": 0.7326007326007326, "percentage": 73.17, "elapsed_time": "1:06:29", "remaining_time": "0:24:22"}
{"current_steps": 310, "total_steps": 410, "loss": 0.539859390258789, "lr": 1.7374107335760936e-05, "epoch": 0.757020757020757, "percentage": 75.61, "elapsed_time": "1:08:12", "remaining_time": "0:22:00"}
{"current_steps": 320, "total_steps": 410, "loss": 0.2917079210281372, "lr": 1.427040974166427e-05, "epoch": 0.7814407814407814, "percentage": 78.05, "elapsed_time": "1:09:14", "remaining_time": "0:19:28"}
{"current_steps": 330, "total_steps": 410, "loss": 0.7617981433868408, "lr": 1.1425541008902851e-05, "epoch": 0.8058608058608059, "percentage": 80.49, "elapsed_time": "1:11:02", "remaining_time": "0:17:13"}
{"current_steps": 340, "total_steps": 410, "loss": 0.6248091697692871, "lr": 8.860109661935674e-06, "epoch": 0.8302808302808303, "percentage": 82.93, "elapsed_time": "1:12:56", "remaining_time": "0:15:00"}
{"current_steps": 350, "total_steps": 410, "loss": 0.4457353115081787, "lr": 6.592699951787362e-06, "epoch": 0.8547008547008547, "percentage": 85.37, "elapsed_time": "1:14:29", "remaining_time": "0:12:46"}
{"current_steps": 350, "total_steps": 410, "eval_loss": 0.35156095027923584, "epoch": 0.8547008547008547, "percentage": 85.37, "elapsed_time": "1:17:04", "remaining_time": "0:13:12"}
{"current_steps": 360, "total_steps": 410, "loss": 0.36368584632873535, "lr": 4.639737229804403e-06, "epoch": 0.8791208791208791, "percentage": 87.8, "elapsed_time": "1:18:37", "remaining_time": "0:10:55"}
{"current_steps": 370, "total_steps": 410, "loss": 0.5256676197052002, "lr": 3.0153689607045845e-06, "epoch": 0.9035409035409036, "percentage": 90.24, "elapsed_time": "1:20:12", "remaining_time": "0:08:40"}
{"current_steps": 380, "total_steps": 410, "loss": 0.5124877452850342, "lr": 1.7313622368738014e-06, "epoch": 0.927960927960928, "percentage": 92.68, "elapsed_time": "1:21:37", "remaining_time": "0:06:26"}
{"current_steps": 390, "total_steps": 410, "loss": 0.444692325592041, "lr": 7.970185363271431e-07, "epoch": 0.9523809523809523, "percentage": 95.12, "elapsed_time": "1:22:51", "remaining_time": "0:04:14"}
{"current_steps": 400, "total_steps": 410, "loss": 0.5859388828277587, "lr": 2.1910634183644474e-07, "epoch": 0.9768009768009768, "percentage": 97.56, "elapsed_time": "1:24:46", "remaining_time": "0:02:07"}
{"current_steps": 400, "total_steps": 410, "eval_loss": 0.3502028286457062, "epoch": 0.9768009768009768, "percentage": 97.56, "elapsed_time": "1:27:22", "remaining_time": "0:02:11"}
{"current_steps": 410, "total_steps": 410, "loss": 0.6934732913970947, "lr": 1.8121093383671738e-09, "epoch": 1.0, "percentage": 100.0, "elapsed_time": "1:29:17", "remaining_time": "0:00:00"}
{"current_steps": 410, "total_steps": 410, "eval_loss": 0.3503350019454956, "epoch": 1.0, "percentage": 100.0, "elapsed_time": "1:31:52", "remaining_time": "0:00:00"}
{"current_steps": 410, "total_steps": 410, "epoch": 1.0, "percentage": 100.0, "elapsed_time": "1:31:56", "remaining_time": "0:00:00"}
|