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)# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("youssefedweqd/working", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- 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
Download LLaMA-Factory/src/llamafactory/hparams/generating_args.py from youssefedweqd/working: direct link, hf CLI and curl.
- Browser
- Download file 2.98 kB
-
https://huggingface.co/youssefedweqd/working/resolve/main/LLaMA-Factory/src/llamafactory/hparams/generating_args.py
- Command line
-
hf download hf://youssefedweqd/working/LLaMA-Factory/src/llamafactory/hparams/generating_args.py
-
curl -L -o generating_args.py https://huggingface.co/youssefedweqd/working/resolve/main/LLaMA-Factory/src/llamafactory/hparams/generating_args.py
2.98 kB
| # Copyright 2025 the LlamaFactory team. | |
| # | |
| # Licensed under the Apache License, Version 2.0 (the "License"); | |
| # you may not use this file except in compliance with the License. | |
| # You may obtain a copy of the License at | |
| # | |
| # http://www.apache.org/licenses/LICENSE-2.0 | |
| # | |
| # Unless required by applicable law or agreed to in writing, software | |
| # distributed under the License is distributed on an "AS IS" BASIS, | |
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
| # See the License for the specific language governing permissions and | |
| # limitations under the License. | |
| from dataclasses import asdict, dataclass, field | |
| from typing import Any | |
| from transformers import GenerationConfig | |
| class GeneratingArguments: | |
| r"""Arguments pertaining to specify the decoding parameters.""" | |
| do_sample: bool = field( | |
| default=True, | |
| metadata={"help": "Whether or not to use sampling, use greedy decoding otherwise."}, | |
| ) | |
| temperature: float = field( | |
| default=0.95, | |
| metadata={"help": "The value used to modulate the next token probabilities."}, | |
| ) | |
| top_p: float = field( | |
| default=0.7, | |
| metadata={ | |
| "help": ( | |
| "The smallest set of most probable tokens with probabilities that add up to top_p or higher are kept." | |
| ) | |
| }, | |
| ) | |
| top_k: int = field( | |
| default=50, | |
| metadata={"help": "The number of highest probability vocabulary tokens to keep for top-k filtering."}, | |
| ) | |
| num_beams: int = field( | |
| default=1, | |
| metadata={"help": "Number of beams for beam search. 1 means no beam search."}, | |
| ) | |
| max_length: int = field( | |
| default=1024, | |
| metadata={"help": "The maximum length the generated tokens can have. It can be overridden by max_new_tokens."}, | |
| ) | |
| max_new_tokens: int = field( | |
| default=1024, | |
| metadata={"help": "The maximum numbers of tokens to generate, ignoring the number of tokens in the prompt."}, | |
| ) | |
| repetition_penalty: float = field( | |
| default=1.0, | |
| metadata={"help": "The parameter for repetition penalty. 1.0 means no penalty."}, | |
| ) | |
| length_penalty: float = field( | |
| default=1.0, | |
| metadata={"help": "Exponential penalty to the length that is used with beam-based generation."}, | |
| ) | |
| skip_special_tokens: bool = field( | |
| default=True, | |
| metadata={"help": "Whether or not to remove special tokens in the decoding."}, | |
| ) | |
| def to_dict(self, obey_generation_config: bool = False) -> dict[str, Any]: | |
| args = asdict(self) | |
| if args.get("max_new_tokens", -1) > 0: | |
| args.pop("max_length", None) | |
| else: | |
| args.pop("max_new_tokens", None) | |
| if obey_generation_config: | |
| generation_config = GenerationConfig() | |
| for key in list(args.keys()): | |
| if not hasattr(generation_config, key): | |
| args.pop(key) | |
| return args | |