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
Update README.md
Browse files
README.md
CHANGED
|
@@ -1,9 +1,45 @@
|
|
| 1 |
-
|
| 2 |
-
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
-
|
| 9 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
language: en
|
| 3 |
+
tags:
|
| 4 |
+
- text-generation
|
| 5 |
+
- ollama
|
| 6 |
+
- aya
|
| 7 |
+
- llm
|
| 8 |
+
- conversational
|
| 9 |
+
pipeline_tag: text-generation
|
| 10 |
+
library_name: transformers
|
| 11 |
+
inference: true
|
| 12 |
+
---
|
| 13 |
+
|
| 14 |
+
# Aya-8B
|
| 15 |
+
|
| 16 |
+
## Model Description
|
| 17 |
+
|
| 18 |
+
This is the Aya-8B model, originally designed for Ollama and converted to be compatible with Hugging Face. Aya is an open-source language model known for its conversational abilities and text generation capabilities.
|
| 19 |
+
|
| 20 |
+
## Usage
|
| 21 |
+
|
| 22 |
+
```python
|
| 23 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 24 |
+
|
| 25 |
+
tokenizer = AutoTokenizer.from_pretrained("Danna8/aya-8b")
|
| 26 |
+
model = AutoModelForCausalLM.from_pretrained("Danna8/aya-8b")
|
| 27 |
+
|
| 28 |
+
inputs = tokenizer("Hello, how are you today?", return_tensors="pt")
|
| 29 |
+
outputs = model.generate(inputs["input_ids"], max_length=100)
|
| 30 |
+
response = tokenizer.decode(outputs[0], skip_special_tokens=True)
|
| 31 |
+
print(response)
|
| 32 |
+
```
|
| 33 |
+
|
| 34 |
+
## Model Details
|
| 35 |
+
|
| 36 |
+
- **Model Type:** Transformer-based language model
|
| 37 |
+
- **Size:** 8 billion parameters
|
| 38 |
+
|
| 39 |
+
|
| 40 |
+
## Limitations and Biases
|
| 41 |
+
|
| 42 |
+
Like all language models, Aya-8B may reproduce biases present in its training data. Users should be aware of these limitations when deploying the model.
|
| 43 |
+
|
| 44 |
+
## License
|
| 45 |
+
|