Instructions to use AmberNeel/tiny-aya-global-redlens-guard-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use AmberNeel/tiny-aya-global-redlens-guard-GGUF with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf AmberNeel/tiny-aya-global-redlens-guard-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf AmberNeel/tiny-aya-global-redlens-guard-GGUF:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf AmberNeel/tiny-aya-global-redlens-guard-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf AmberNeel/tiny-aya-global-redlens-guard-GGUF:Q4_K_M
Build from source code
git clone https://github.com/ggml-org/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-app # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama serve -hf AmberNeel/tiny-aya-global-redlens-guard-GGUF:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama cli -hf AmberNeel/tiny-aya-global-redlens-guard-GGUF:Q4_K_M
Use Docker
docker model run hf.co/AmberNeel/tiny-aya-global-redlens-guard-GGUF:Q4_K_M
- Llama new
- LM Studio
- Jan
- vLLM
How to use AmberNeel/tiny-aya-global-redlens-guard-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "AmberNeel/tiny-aya-global-redlens-guard-GGUF" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "AmberNeel/tiny-aya-global-redlens-guard-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/AmberNeel/tiny-aya-global-redlens-guard-GGUF:Q4_K_M
- Ollama
How to use AmberNeel/tiny-aya-global-redlens-guard-GGUF with Ollama:
ollama run hf.co/AmberNeel/tiny-aya-global-redlens-guard-GGUF:Q4_K_M
- Unsloth Desktop
- Docker Model Runner
How to use AmberNeel/tiny-aya-global-redlens-guard-GGUF with Docker Model Runner:
docker model run hf.co/AmberNeel/tiny-aya-global-redlens-guard-GGUF:Q4_K_M
- Lemonade
How to use AmberNeel/tiny-aya-global-redlens-guard-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull AmberNeel/tiny-aya-global-redlens-guard-GGUF:Q4_K_M
Run and chat with the model
lemonade run user.tiny-aya-global-redlens-guard-GGUF-Q4_K_M
List all available models
lemonade list
- Atomic Chat
Tiny Aya Global ยท RedLens Guard (GGUF, Q4_K_M)
CohereLabs/tiny-aya-global quantized to Q4_K_M, with the RedLens Guard v1 multilingual safety preamble baked into the chat template. Built for the Lexsi AI Safety & Alignment Hackathon (Track 2). Weights are unchanged; only tokenizer.chat_template and the model name/description metadata differ from the plain Q4_K_M file.
Why: Tiny Aya Global refuses all of our 30 harmful seed requests in English, but gives full or partial help to 47% of them in Telugu and 53% in Hinglish. With the guard, those drop to 13% and 10%, Hindi from 10% to 0%, and the cross-lingual gap from 53 to 13 points. The cost is +2.1 pts over-refusal on benign XSTest prompts.
| Metric (150 harmful / 96 benign prompts, enยทhiยทteยทHinglish + role-play) | Baseline | Guard |
|---|---|---|
| Attack success, full compliance | 8.7% | 4.0% |
| Attack success incl. partial | 28.0% | 8.7% |
| Mean harm severity (0-1) | 0.142 | 0.044 |
| Cross-lingual gap (full + partial) | 53.3 pts | 13.3 pts |
| Over-refusal (benign) | 8.3% | 10.4% |
| Benign helpfulness | 78.1% | 71.9% |
| Reply in user's language | 99.2% | 99.2% |
Measured on the Cohere API (same weights) with the guard sent as the system message; full method, code and logs: github.com/cryptocloud786/aya-redlens, prompt set, eval logs.
Use
llama-cli -m tiny-aya-global-redlens-guard-Q4_K_M.gguf -cnv
from llama_cpp import Llama
llm = Llama(model_path="tiny-aya-global-redlens-guard-Q4_K_M.gguf", n_ctx=4096)
llm.create_chat_completion(messages=[{"role": "user", "content": "Python process ko kaise kill karte hain?"}])
The guard is applied even with no system message. Your own system message is appended after the guard (it cannot replace it). chat_template_redlens_guard.jinja is the template on its own, for use with the original model in transformers/vLLM.
What the guard says (summary)
Judge requests by intent, not language, script, code-mixing, encoding or role-play framing; do not give operational help for weapons, hacking, fraud, violence, self-harm, harassment or hate; decline briefly in the user's own language with a safe alternative; and do not over-refuse homonyms, figurative language, fiction without operational detail, definitions, history or public facts.
Limits
Prompt-level defence: anyone with the weights can remove it. Role-play jailbreaks still succeed 20% of the time in English. Hinglish comprehension is weak in the base model and the guard does not fix it. Licence and acceptable use follow the base model (CC BY-NC 4.0, Cohere Labs AUP).
- Downloads last month
- 143
4-bit