Text Generation
Transformers
Safetensors
cohere2
safety
alignment
multilingual
african-languages
lisa
safetune
lexsi-hackathon
conversational
Instructions to use NFTKING/isoglot-tiny-aya-lisa with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use NFTKING/isoglot-tiny-aya-lisa with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="NFTKING/isoglot-tiny-aya-lisa") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("NFTKING/isoglot-tiny-aya-lisa") model = AutoModelForCausalLM.from_pretrained("NFTKING/isoglot-tiny-aya-lisa", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use NFTKING/isoglot-tiny-aya-lisa with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "NFTKING/isoglot-tiny-aya-lisa" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "NFTKING/isoglot-tiny-aya-lisa", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/NFTKING/isoglot-tiny-aya-lisa
- SGLang
How to use NFTKING/isoglot-tiny-aya-lisa 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 "NFTKING/isoglot-tiny-aya-lisa" \ --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": "NFTKING/isoglot-tiny-aya-lisa", "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 "NFTKING/isoglot-tiny-aya-lisa" \ --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": "NFTKING/isoglot-tiny-aya-lisa", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use NFTKING/isoglot-tiny-aya-lisa with Docker Model Runner:
docker model run hf.co/NFTKING/isoglot-tiny-aya-lisa
isoglot-tiny-aya-lisa
Tiny Aya Global fine-tuned to refuse harmful requests as reliably in Hausa, Yoruba and Igbo as in English. Built for the Lexsi AI Safety and Alignment Hackathon (Track 2a, multilingual and code-mixed safety).
- Method: SafeTune
LisaTrainer(LISA, rho 0.1, 20 alignment / 20 fine-tune steps, 2 epochs, LoRA, lr 1e-4), merged, fp16. - Data: 944 rows (refusals to harmful requests and helpful answers to benign ones, 118 per kind
and language in English, Hausa, Yoruba and Igbo), written by Claude Sonnet 5.5 from BeaverTails,
OR-Bench hard-1k and Alpaca seeds, cleaned and exported by CuratorKIT. In
NFTKING/isoglot-runs under
traindata/. - Code: github.com/nftkingiii/isoglot, notebooks 05 and 06.
Results on TukaBench (public sets, judged with TukaBench's prompt by Claude Sonnet 5.5)
| Harmful prompts, refused | English | Hausa | Igbo | Yoruba |
|---|---|---|---|---|
| Tiny Aya Global | 79.5% | 65.6% | 54.6% | 39.7% |
| This model | 88.2% | 87.7% | 84.6% | 84.0% |
| Benign prompts, over-refused | English | Hausa | Igbo | Yoruba |
|---|---|---|---|---|
| Tiny Aya Global | 10% | 22% | 14% | 11% |
| This model | 12% | 37% | 39% | 35% |
The refusal gap to English closes (Yoruba 40% to 84%) and harmful compliance stays at 2-4%, but benign requests in Hausa, Yoruba and Igbo are over-refused more often than before. Use it as a research artifact, not as a deployed assistant.
License
CC BY-NC 4.0, inherited from Tiny Aya Global. Non-commercial use only.
- Downloads last month
- 21
Model tree for NFTKING/isoglot-tiny-aya-lisa
Collection including NFTKING/isoglot-tiny-aya-lisa
Collection
Tiny Aya fine-tuned to refuse harmful requests in Hausa, Yoruba and Igbo (Lexsi hackathon, Track 2a) โข 3 items โข Updated