Text Generation
Transformers
Safetensors
GGUF
Arabic
English
arabic
edge
small-language-model
sft
dpo
qwen2
Eval Results (legacy)
conversational
Instructions to use RightNowAI/RightNow-Arabic-0.5B-Turbo with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use RightNowAI/RightNow-Arabic-0.5B-Turbo with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="RightNowAI/RightNow-Arabic-0.5B-Turbo") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("RightNowAI/RightNow-Arabic-0.5B-Turbo", dtype="auto") - llama-cpp-python
How to use RightNowAI/RightNow-Arabic-0.5B-Turbo with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="RightNowAI/RightNow-Arabic-0.5B-Turbo", filename="gguf/RightNow-Arabic-0.5B-Turbo-f16.gguf", )
llm.create_chat_completion( messages = [ { "role": "user", "content": "What is the capital of France?" } ] ) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- llama.cpp
How to use RightNowAI/RightNow-Arabic-0.5B-Turbo with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf RightNowAI/RightNow-Arabic-0.5B-Turbo:Q4_K_M # Run inference directly in the terminal: llama-cli -hf RightNowAI/RightNow-Arabic-0.5B-Turbo:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf RightNowAI/RightNow-Arabic-0.5B-Turbo:Q4_K_M # Run inference directly in the terminal: llama-cli -hf RightNowAI/RightNow-Arabic-0.5B-Turbo:Q4_K_M
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf RightNowAI/RightNow-Arabic-0.5B-Turbo:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf RightNowAI/RightNow-Arabic-0.5B-Turbo:Q4_K_M
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf RightNowAI/RightNow-Arabic-0.5B-Turbo:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf RightNowAI/RightNow-Arabic-0.5B-Turbo:Q4_K_M
Use Docker
docker model run hf.co/RightNowAI/RightNow-Arabic-0.5B-Turbo:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use RightNowAI/RightNow-Arabic-0.5B-Turbo with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "RightNowAI/RightNow-Arabic-0.5B-Turbo" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "RightNowAI/RightNow-Arabic-0.5B-Turbo", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/RightNowAI/RightNow-Arabic-0.5B-Turbo:Q4_K_M
- SGLang
How to use RightNowAI/RightNow-Arabic-0.5B-Turbo 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 "RightNowAI/RightNow-Arabic-0.5B-Turbo" \ --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": "RightNowAI/RightNow-Arabic-0.5B-Turbo", "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 "RightNowAI/RightNow-Arabic-0.5B-Turbo" \ --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": "RightNowAI/RightNow-Arabic-0.5B-Turbo", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use RightNowAI/RightNow-Arabic-0.5B-Turbo with Ollama:
ollama run hf.co/RightNowAI/RightNow-Arabic-0.5B-Turbo:Q4_K_M
- Unsloth Studio new
How to use RightNowAI/RightNow-Arabic-0.5B-Turbo with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for RightNowAI/RightNow-Arabic-0.5B-Turbo to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for RightNowAI/RightNow-Arabic-0.5B-Turbo to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for RightNowAI/RightNow-Arabic-0.5B-Turbo to start chatting
- Pi new
How to use RightNowAI/RightNow-Arabic-0.5B-Turbo with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama-server -hf RightNowAI/RightNow-Arabic-0.5B-Turbo:Q4_K_M
Configure the model in Pi
# Install Pi: npm install -g @mariozechner/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "RightNowAI/RightNow-Arabic-0.5B-Turbo:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use RightNowAI/RightNow-Arabic-0.5B-Turbo with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama-server -hf RightNowAI/RightNow-Arabic-0.5B-Turbo:Q4_K_M
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default RightNowAI/RightNow-Arabic-0.5B-Turbo:Q4_K_M
Run Hermes
hermes
- Docker Model Runner
How to use RightNowAI/RightNow-Arabic-0.5B-Turbo with Docker Model Runner:
docker model run hf.co/RightNowAI/RightNow-Arabic-0.5B-Turbo:Q4_K_M
- Lemonade
How to use RightNowAI/RightNow-Arabic-0.5B-Turbo with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull RightNowAI/RightNow-Arabic-0.5B-Turbo:Q4_K_M
Run and chat with the model
lemonade run user.RightNow-Arabic-0.5B-Turbo-Q4_K_M
List all available models
lemonade list
Add int8 model weights
Browse files- .gitattributes +1 -0
- int8/chat_template.jinja +54 -0
- int8/config.json +73 -0
- int8/generation_config.json +9 -0
- int8/model.safetensors +3 -0
- int8/tokenizer.json +3 -0
- int8/tokenizer_config.json +29 -0
.gitattributes
CHANGED
|
@@ -37,3 +37,4 @@ benchmark_pareto.png filter=lfs diff=lfs merge=lfs -text
|
|
| 37 |
benchmark_bars.png filter=lfs diff=lfs merge=lfs -text
|
| 38 |
benchmark_chart.png filter=lfs diff=lfs merge=lfs -text
|
| 39 |
bf16/tokenizer.json filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
| 37 |
benchmark_bars.png filter=lfs diff=lfs merge=lfs -text
|
| 38 |
benchmark_chart.png filter=lfs diff=lfs merge=lfs -text
|
| 39 |
bf16/tokenizer.json filter=lfs diff=lfs merge=lfs -text
|
| 40 |
+
int8/tokenizer.json filter=lfs diff=lfs merge=lfs -text
|
int8/chat_template.jinja
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{%- if tools %}
|
| 2 |
+
{{- '<|im_start|>system\n' }}
|
| 3 |
+
{%- if messages[0]['role'] == 'system' %}
|
| 4 |
+
{{- messages[0]['content'] }}
|
| 5 |
+
{%- else %}
|
| 6 |
+
{{- 'You are a helpful assistant.' }}
|
| 7 |
+
{%- endif %}
|
| 8 |
+
{{- "\n\n# Tools\n\nYou may call one or more functions to assist with the user query.\n\nYou are provided with function signatures within <tools></tools> XML tags:\n<tools>" }}
|
| 9 |
+
{%- for tool in tools %}
|
| 10 |
+
{{- "\n" }}
|
| 11 |
+
{{- tool | tojson }}
|
| 12 |
+
{%- endfor %}
|
| 13 |
+
{{- "\n</tools>\n\nFor each function call, return a json object with function name and arguments within <tool_call></tool_call> XML tags:\n<tool_call>\n{\"name\": <function-name>, \"arguments\": <args-json-object>}\n</tool_call><|im_end|>\n" }}
|
| 14 |
+
{%- else %}
|
| 15 |
+
{%- if messages[0]['role'] == 'system' %}
|
| 16 |
+
{{- '<|im_start|>system\n' + messages[0]['content'] + '<|im_end|>\n' }}
|
| 17 |
+
{%- else %}
|
| 18 |
+
{{- '<|im_start|>system\nYou are a helpful assistant.<|im_end|>\n' }}
|
| 19 |
+
{%- endif %}
|
| 20 |
+
{%- endif %}
|
| 21 |
+
{%- for message in messages %}
|
| 22 |
+
{%- if (message.role == "user") or (message.role == "system" and not loop.first) or (message.role == "assistant" and not message.tool_calls) %}
|
| 23 |
+
{{- '<|im_start|>' + message.role + '\n' + message.content + '<|im_end|>' + '\n' }}
|
| 24 |
+
{%- elif message.role == "assistant" %}
|
| 25 |
+
{{- '<|im_start|>' + message.role }}
|
| 26 |
+
{%- if message.content %}
|
| 27 |
+
{{- '\n' + message.content }}
|
| 28 |
+
{%- endif %}
|
| 29 |
+
{%- for tool_call in message.tool_calls %}
|
| 30 |
+
{%- if tool_call.function is defined %}
|
| 31 |
+
{%- set tool_call = tool_call.function %}
|
| 32 |
+
{%- endif %}
|
| 33 |
+
{{- '\n<tool_call>\n{"name": "' }}
|
| 34 |
+
{{- tool_call.name }}
|
| 35 |
+
{{- '", "arguments": ' }}
|
| 36 |
+
{{- tool_call.arguments | tojson }}
|
| 37 |
+
{{- '}\n</tool_call>' }}
|
| 38 |
+
{%- endfor %}
|
| 39 |
+
{{- '<|im_end|>\n' }}
|
| 40 |
+
{%- elif message.role == "tool" %}
|
| 41 |
+
{%- if (loop.index0 == 0) or (messages[loop.index0 - 1].role != "tool") %}
|
| 42 |
+
{{- '<|im_start|>user' }}
|
| 43 |
+
{%- endif %}
|
| 44 |
+
{{- '\n<tool_response>\n' }}
|
| 45 |
+
{{- message.content }}
|
| 46 |
+
{{- '\n</tool_response>' }}
|
| 47 |
+
{%- if loop.last or (messages[loop.index0 + 1].role != "tool") %}
|
| 48 |
+
{{- '<|im_end|>\n' }}
|
| 49 |
+
{%- endif %}
|
| 50 |
+
{%- endif %}
|
| 51 |
+
{%- endfor %}
|
| 52 |
+
{%- if add_generation_prompt %}
|
| 53 |
+
{{- '<|im_start|>assistant\n' }}
|
| 54 |
+
{%- endif %}
|
int8/config.json
ADDED
|
@@ -0,0 +1,73 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"architectures": [
|
| 3 |
+
"Qwen2ForCausalLM"
|
| 4 |
+
],
|
| 5 |
+
"attention_dropout": 0.0,
|
| 6 |
+
"bos_token_id": null,
|
| 7 |
+
"dtype": "bfloat16",
|
| 8 |
+
"eos_token_id": 151643,
|
| 9 |
+
"hidden_act": "silu",
|
| 10 |
+
"hidden_size": 896,
|
| 11 |
+
"initializer_range": 0.02,
|
| 12 |
+
"intermediate_size": 4864,
|
| 13 |
+
"layer_types": [
|
| 14 |
+
"full_attention",
|
| 15 |
+
"full_attention",
|
| 16 |
+
"full_attention",
|
| 17 |
+
"full_attention",
|
| 18 |
+
"full_attention",
|
| 19 |
+
"full_attention",
|
| 20 |
+
"full_attention",
|
| 21 |
+
"full_attention",
|
| 22 |
+
"full_attention",
|
| 23 |
+
"full_attention",
|
| 24 |
+
"full_attention",
|
| 25 |
+
"full_attention",
|
| 26 |
+
"full_attention",
|
| 27 |
+
"full_attention",
|
| 28 |
+
"full_attention",
|
| 29 |
+
"full_attention",
|
| 30 |
+
"full_attention",
|
| 31 |
+
"full_attention",
|
| 32 |
+
"full_attention",
|
| 33 |
+
"full_attention",
|
| 34 |
+
"full_attention",
|
| 35 |
+
"full_attention",
|
| 36 |
+
"full_attention",
|
| 37 |
+
"full_attention"
|
| 38 |
+
],
|
| 39 |
+
"max_position_embeddings": 32768,
|
| 40 |
+
"max_window_layers": 24,
|
| 41 |
+
"model_type": "qwen2",
|
| 42 |
+
"num_attention_heads": 14,
|
| 43 |
+
"num_hidden_layers": 24,
|
| 44 |
+
"num_key_value_heads": 2,
|
| 45 |
+
"pad_token_id": 151643,
|
| 46 |
+
"quantization_config": {
|
| 47 |
+
"_load_in_4bit": false,
|
| 48 |
+
"_load_in_8bit": true,
|
| 49 |
+
"bnb_4bit_compute_dtype": "float32",
|
| 50 |
+
"bnb_4bit_quant_storage": "uint8",
|
| 51 |
+
"bnb_4bit_quant_type": "fp4",
|
| 52 |
+
"bnb_4bit_use_double_quant": false,
|
| 53 |
+
"llm_int8_enable_fp32_cpu_offload": false,
|
| 54 |
+
"llm_int8_has_fp16_weight": false,
|
| 55 |
+
"llm_int8_skip_modules": null,
|
| 56 |
+
"llm_int8_threshold": 6.0,
|
| 57 |
+
"load_in_4bit": false,
|
| 58 |
+
"load_in_8bit": true,
|
| 59 |
+
"quant_method": "bitsandbytes"
|
| 60 |
+
},
|
| 61 |
+
"rms_norm_eps": 1e-06,
|
| 62 |
+
"rope_parameters": {
|
| 63 |
+
"rope_theta": 1000000.0,
|
| 64 |
+
"rope_type": "default"
|
| 65 |
+
},
|
| 66 |
+
"sliding_window": null,
|
| 67 |
+
"tie_word_embeddings": true,
|
| 68 |
+
"transformers_version": "5.5.0",
|
| 69 |
+
"use_cache": false,
|
| 70 |
+
"use_mrope": false,
|
| 71 |
+
"use_sliding_window": false,
|
| 72 |
+
"vocab_size": 178697
|
| 73 |
+
}
|
int8/generation_config.json
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"do_sample": false,
|
| 3 |
+
"eos_token_id": [
|
| 4 |
+
151643
|
| 5 |
+
],
|
| 6 |
+
"max_new_tokens": 2048,
|
| 7 |
+
"pad_token_id": 151643,
|
| 8 |
+
"transformers_version": "5.5.0"
|
| 9 |
+
}
|
int8/model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:38232218af24b501cc44d3d724e3c363f7b93371df8dce75ed49737c1c647035
|
| 3 |
+
size 679478360
|
int8/tokenizer.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:f64f070635ecc8594a491b9bd7d8be78908632011d0ed1a800618c15aab3ac43
|
| 3 |
+
size 16507759
|
int8/tokenizer_config.json
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"add_prefix_space": false,
|
| 3 |
+
"backend": "tokenizers",
|
| 4 |
+
"bos_token": null,
|
| 5 |
+
"clean_up_tokenization_spaces": false,
|
| 6 |
+
"eos_token": "<|endoftext|>",
|
| 7 |
+
"errors": "replace",
|
| 8 |
+
"extra_special_tokens": [
|
| 9 |
+
"<|im_start|>",
|
| 10 |
+
"<|im_end|>",
|
| 11 |
+
"<|object_ref_start|>",
|
| 12 |
+
"<|object_ref_end|>",
|
| 13 |
+
"<|box_start|>",
|
| 14 |
+
"<|box_end|>",
|
| 15 |
+
"<|quad_start|>",
|
| 16 |
+
"<|quad_end|>",
|
| 17 |
+
"<|vision_start|>",
|
| 18 |
+
"<|vision_end|>",
|
| 19 |
+
"<|vision_pad|>",
|
| 20 |
+
"<|image_pad|>",
|
| 21 |
+
"<|video_pad|>"
|
| 22 |
+
],
|
| 23 |
+
"is_local": true,
|
| 24 |
+
"model_max_length": 131072,
|
| 25 |
+
"pad_token": "<|endoftext|>",
|
| 26 |
+
"split_special_tokens": false,
|
| 27 |
+
"tokenizer_class": "Qwen2Tokenizer",
|
| 28 |
+
"unk_token": null
|
| 29 |
+
}
|