Text Generation
Transformers
Safetensors
Arabic
qwen
llama-factory
lora
arabic
question-answering
instruction-tuning
kaggle
fine-tuned
conversational
Instructions to use youssefedweqd/working with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use youssefedweqd/working with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="youssefedweqd/working") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("youssefedweqd/working", dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use youssefedweqd/working with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "youssefedweqd/working" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "youssefedweqd/working", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/youssefedweqd/working
- SGLang
How to use youssefedweqd/working 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 "youssefedweqd/working" \ --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": "youssefedweqd/working", "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 "youssefedweqd/working" \ --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": "youssefedweqd/working", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use youssefedweqd/working with Docker Model Runner:
docker model run hf.co/youssefedweqd/working
| ### model | |
| model_name_or_path: Qwen/Qwen2.5-1.5B | |
| trust_remote_code: true | |
| ### method | |
| stage: sft | |
| do_train: true | |
| finetuning_type: lora | |
| lora_rank: 64 | |
| lora_target: all | |
| ### dataset | |
| dataset: QAtrain | |
| eval_dataset: QAval | |
| template: qwen | |
| cutoff_len: 2048 | |
| # max_samples: 50 | |
| overwrite_cache: true | |
| preprocessing_num_workers: 8 | |
| ### output | |
| resume_from_checkpoint: /kaggle/working/Model/last-checkpoint | |
| output_dir: /kaggle/working/ | |
| logging_steps: 50 | |
| save_steps: 200 | |
| plot_loss: true | |
| overwrite_output_dir: true | |
| ### train | |
| per_device_train_batch_size: 1 | |
| gradient_accumulation_steps: 16 | |
| learning_rate: 1.0e-4 | |
| num_train_epochs: 3.0 | |
| lr_scheduler_type: cosine | |
| warmup_ratio: 0.1 | |
| bf16: true # full | |
| ddp_timeout: 180000000 | |
| torch_compile: false | |
| ### eval | |
| # val_size: 0.1 | |
| per_device_eval_batch_size: 1 | |
| eval_strategy: steps | |
| eval_steps: 200 | |
| report_to: wandb | |
| run_name: Qwennn | |
| push_to_hub: true | |
| export_hub_model_id: Youssef/QWEN_Arabic_Q&A | |
| hub_private_repo: true | |
| hub_strategy: checkpoint | |