Text Generation
Transformers
Safetensors
llama
llm
neuralnode
multilingual
causal-lm
horus
tokenai
tts
voice
text-generation-inference
Instructions to use tokenaii/horus with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use tokenaii/horus with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="tokenaii/horus")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("tokenaii/horus") model = AutoModelForCausalLM.from_pretrained("tokenaii/horus", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use tokenaii/horus with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "tokenaii/horus" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "tokenaii/horus", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/tokenaii/horus
- SGLang
How to use tokenaii/horus 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 "tokenaii/horus" \ --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": "tokenaii/horus", "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 "tokenaii/horus" \ --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": "tokenaii/horus", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use tokenaii/horus with Docker Model Runner:
docker model run hf.co/tokenaii/horus
Update README.md
Browse files
README.md
CHANGED
|
@@ -17,21 +17,20 @@ tags:
|
|
| 17 |
- llama
|
| 18 |
- llm
|
| 19 |
- text-generation
|
| 20 |
-
-
|
| 21 |
- multilingual
|
| 22 |
- causal-lm
|
| 23 |
- horus
|
| 24 |
- tokenai
|
|
|
|
|
|
|
| 25 |
datasets:
|
| 26 |
- tokenaii/horus-training-data
|
| 27 |
metrics: []
|
| 28 |
widget:
|
| 29 |
-
- text: "### User:\nWhat is the capital of Egypt?\n\n### Assistant:"
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
- text: "### User:\nمن هو أول رئيس لمصر؟\n\n### Assistant:"
|
| 33 |
-
output:
|
| 34 |
-
text: "أول رئيس لمصر بعد ثورة 1952 هو محمد نجيب."
|
| 35 |
inference: true
|
| 36 |
---
|
| 37 |
|
|
@@ -123,26 +122,37 @@ GGUF versions available at: [tokenaii/Hours-1.0-4B-GGUF](https://huggingface.co/
|
|
| 123 |
|
| 124 |
## Quick Start
|
| 125 |
|
| 126 |
-
### Using
|
|
|
|
|
|
|
| 127 |
|
| 128 |
```python
|
| 129 |
-
|
| 130 |
-
|
| 131 |
-
|
| 132 |
-
|
| 133 |
-
|
| 134 |
-
|
| 135 |
-
|
| 136 |
-
|
| 137 |
-
|
| 138 |
-
|
| 139 |
-
|
| 140 |
-
|
| 141 |
-
outputs = model.generate(**inputs, max_new_tokens=100)
|
| 142 |
-
response = tokenizer.decode(outputs[0], skip_special_tokens=True)
|
| 143 |
-
print(response)
|
| 144 |
```
|
| 145 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 146 |
### Using GGUF with llama.cpp
|
| 147 |
|
| 148 |
```bash
|
|
|
|
| 17 |
- llama
|
| 18 |
- llm
|
| 19 |
- text-generation
|
| 20 |
+
- neuralnode
|
| 21 |
- multilingual
|
| 22 |
- causal-lm
|
| 23 |
- horus
|
| 24 |
- tokenai
|
| 25 |
+
- tts
|
| 26 |
+
- voice
|
| 27 |
datasets:
|
| 28 |
- tokenaii/horus-training-data
|
| 29 |
metrics: []
|
| 30 |
widget:
|
| 31 |
+
- text: "### User:\nWhat is the capital of Egypt?\n\n### Assistant:\nThe capital of Egypt is Cairo."
|
| 32 |
+
- text: "### User:\nمن هو أول رئيس لمصر؟\n\n### Assistant:\nأول رئيس لمصر بعد ثورة 1952 هو محمد نجيب."
|
| 33 |
+
- text: "### User:\nHello Horus!\n\n### Assistant:\nHello! I'm Horus, an AI assistant developed by TokenAI. How can I help you today?"
|
|
|
|
|
|
|
|
|
|
| 34 |
inference: true
|
| 35 |
---
|
| 36 |
|
|
|
|
| 122 |
|
| 123 |
## Quick Start
|
| 124 |
|
| 125 |
+
### Using NeuralNode (Recommended)
|
| 126 |
+
|
| 127 |
+
The easiest way to use Horus models is with the NeuralNode framework:
|
| 128 |
|
| 129 |
```python
|
| 130 |
+
import neuralnode as nn
|
| 131 |
+
|
| 132 |
+
MODEL_ID = "tokenaii/Hours-1.0-4B-GGUF/Horus-1.0-4B-Q6_K.gguf"
|
| 133 |
+
DEVICE = "cpu" # Change to "cuda" for GPU acceleration
|
| 134 |
+
|
| 135 |
+
# Download and load
|
| 136 |
+
model = nn.HorusModel(MODEL_ID, device=DEVICE).load()
|
| 137 |
+
|
| 138 |
+
# Use immediately
|
| 139 |
+
response = model.chat([{"role": "user", "content": "hi horus im emy"}])
|
| 140 |
+
|
| 141 |
+
print(response.content)
|
|
|
|
|
|
|
|
|
|
| 142 |
```
|
| 143 |
|
| 144 |
+
### Select Quantized Version
|
| 145 |
+
|
| 146 |
+
Choose the best version for your hardware:
|
| 147 |
+
|
| 148 |
+
| Version | Size | Quality | Code |
|
| 149 |
+
|---------|------|---------|------|
|
| 150 |
+
| F16 | 9.03 GB | Maximum | `Horus-1.0-4B-F16.gguf` |
|
| 151 |
+
| Q8_0 | 4.0 GB | Near lossless | `Horus-1.0-4B-Q8_0.gguf` |
|
| 152 |
+
| Q6_K | 3.71 GB | Excellent | `Horus-1.0-4B-Q6_K.gguf` |
|
| 153 |
+
| Q5_K_M | 3.23 GB | Very Good | `Horus-1.0-4B-Q5_K_M.gguf` |
|
| 154 |
+
| Q4_K_M | 2.78 GB | Good | `Horus-1.0-4B-Q4_K_M.gguf` |
|
| 155 |
+
|
| 156 |
### Using GGUF with llama.cpp
|
| 157 |
|
| 158 |
```bash
|