Text Generation
Transformers
TensorBoard
Safetensors
Moroccan Arabic
bloom
Generated from Trainer
text-generation-inference
Instructions to use ychafiqui/darija-text-generation with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ychafiqui/darija-text-generation with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="ychafiqui/darija-text-generation")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("ychafiqui/darija-text-generation") model = AutoModelForCausalLM.from_pretrained("ychafiqui/darija-text-generation", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use ychafiqui/darija-text-generation with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ychafiqui/darija-text-generation" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ychafiqui/darija-text-generation", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/ychafiqui/darija-text-generation
- SGLang
How to use ychafiqui/darija-text-generation 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 "ychafiqui/darija-text-generation" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ychafiqui/darija-text-generation", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'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 "ychafiqui/darija-text-generation" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ychafiqui/darija-text-generation", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use ychafiqui/darija-text-generation with Docker Model Runner:
docker model run hf.co/ychafiqui/darija-text-generation
Download training_args.bin from ychafiqui/darija-text-generation: direct link, hf CLI and curl.
- Browser
- Download file 4.6 kB
-
https://huggingface.co/ychafiqui/darija-text-generation/resolve/main/training_args.bin
- Command line
-
hf download hf://ychafiqui/darija-text-generation/training_args.bin
-
curl -L -o training_args.bin https://huggingface.co/ychafiqui/darija-text-generation/resolve/main/training_args.bin
4.6 kB
- Xet hash:
- cc7496a64db0e1b8b83f8bbb8d856ae0792f5aec85841b88bb5eb362afe353e6
- Size of remote file:
- 4.6 kB
- SHA256:
- 8a13e5b99c0f3401b7cb30225c0a4fd2f52d8852ce3533c4a4a207115f922cb5
·
Xet efficiently stores Large Files inside Git, intelligently splitting files into unique chunks and accelerating uploads and downloads. More info.