Text Generation
Transformers
PyTorch
English
llama
ollama
aya
llm
conversational
custom_code
text-generation-inference
Instructions to use Danna8/aya-8b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Danna8/aya-8b with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Danna8/aya-8b", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Danna8/aya-8b", trust_remote_code=True) model = AutoModelForCausalLM.from_pretrained("Danna8/aya-8b", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Danna8/aya-8b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Danna8/aya-8b" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Danna8/aya-8b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Danna8/aya-8b
- SGLang
How to use Danna8/aya-8b 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 "Danna8/aya-8b" \ --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": "Danna8/aya-8b", "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 "Danna8/aya-8b" \ --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": "Danna8/aya-8b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use Danna8/aya-8b with Docker Model Runner:
docker model run hf.co/Danna8/aya-8b
| {"schemaVersion":2,"mediaType":"application/vnd.docker.distribution.manifest.v2+json","config":{"mediaType":"application/vnd.docker.container.image.v1+json","digest":"sha256:e054a618862799ac9b20ce5666dd8bbfd2a080030a165b9b1b2231961cc6ddd6","size":492},"layers":[{"mediaType":"application/vnd.ollama.image.model","digest":"sha256:495401f864a67def45e0db861e8334b8ae3359765e921e32d5741ed7a84fc848","size":4797459296},{"mediaType":"application/vnd.ollama.image.license","digest":"sha256:f0624a2393a508d33d76f3c66f0e5da2f830d2fe9b727f4831faeb25e27d106f","size":13884},{"mediaType":"application/vnd.ollama.image.template","digest":"sha256:42499e38acdff5e24aecef98617114c4cb6cb50e4c533b3e22e1bfd65b543418","size":270},{"mediaType":"application/vnd.ollama.image.params","digest":"sha256:36b9655abe6a94dc438a01642cf2c0d88f0d6dcb63a563a2bfe9b6f0c4c80850","size":81}]} |