Instructions to use itssaharsh/tiny-aya-global-unlearn-bio-default-layers with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use itssaharsh/tiny-aya-global-unlearn-bio-default-layers with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="itssaharsh/tiny-aya-global-unlearn-bio-default-layers") 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("itssaharsh/tiny-aya-global-unlearn-bio-default-layers") model = AutoModelForCausalLM.from_pretrained("itssaharsh/tiny-aya-global-unlearn-bio-default-layers", 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
- llama.cpp
How to use itssaharsh/tiny-aya-global-unlearn-bio-default-layers 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 itssaharsh/tiny-aya-global-unlearn-bio-default-layers:Q4_K_M # Run inference directly in the terminal: llama cli -hf itssaharsh/tiny-aya-global-unlearn-bio-default-layers:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf itssaharsh/tiny-aya-global-unlearn-bio-default-layers:Q4_K_M # Run inference directly in the terminal: llama cli -hf itssaharsh/tiny-aya-global-unlearn-bio-default-layers: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 itssaharsh/tiny-aya-global-unlearn-bio-default-layers:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama cli -hf itssaharsh/tiny-aya-global-unlearn-bio-default-layers:Q4_K_M
Use Docker
docker model run hf.co/itssaharsh/tiny-aya-global-unlearn-bio-default-layers:Q4_K_M
- Llama new
- LM Studio
- Jan
- vLLM
How to use itssaharsh/tiny-aya-global-unlearn-bio-default-layers with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "itssaharsh/tiny-aya-global-unlearn-bio-default-layers" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "itssaharsh/tiny-aya-global-unlearn-bio-default-layers", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/itssaharsh/tiny-aya-global-unlearn-bio-default-layers:Q4_K_M
- SGLang
How to use itssaharsh/tiny-aya-global-unlearn-bio-default-layers 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 "itssaharsh/tiny-aya-global-unlearn-bio-default-layers" \ --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": "itssaharsh/tiny-aya-global-unlearn-bio-default-layers", "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 "itssaharsh/tiny-aya-global-unlearn-bio-default-layers" \ --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": "itssaharsh/tiny-aya-global-unlearn-bio-default-layers", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use itssaharsh/tiny-aya-global-unlearn-bio-default-layers with Ollama:
ollama run hf.co/itssaharsh/tiny-aya-global-unlearn-bio-default-layers:Q4_K_M
- Unsloth Desktop
- Docker Model Runner
How to use itssaharsh/tiny-aya-global-unlearn-bio-default-layers with Docker Model Runner:
docker model run hf.co/itssaharsh/tiny-aya-global-unlearn-bio-default-layers:Q4_K_M
- Lemonade
How to use itssaharsh/tiny-aya-global-unlearn-bio-default-layers with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull itssaharsh/tiny-aya-global-unlearn-bio-default-layers:Q4_K_M
Run and chat with the model
lemonade run user.tiny-aya-global-unlearn-bio-default-layers-Q4_K_M
List all available models
lemonade list
- Atomic Chat
Tiny Aya Global, hazardous biology unlearned (Default layers)
SafeTune RMU at its default layers (5 to 7). Part of Relapse: is the forgotten knowledge still gone in the 4-bit file?
This is CohereLabs/tiny-aya-global with hazardous biology knowledge removed by SafeTune's RMU, editing only the MLP down-projections of layers 5 to 7 (SafeTune's default). At full precision it scores 38.7% on WMDP-bio (the original scores 63.3%; guessing scores 25%) and 51.6% on MMLU (original 55.4%).
Every file format
| File | WMDP-bio (forget, lower is better) | MMLU (keep, higher is better) | Original MMLU on the same file |
|---|---|---|---|
| fp16 | 38.7% | 51.6% | 55.4% |
| bf16 | 38.6% | 51.4% | 55.4% |
| Q8_0 | 38.4% | 51.4% | 55.1% |
| Q6_K | 39.1% | 51.7% | 55.6% |
| Q4_K_M | 37.2% | 49.3% | 54.8% |
| Q4_0 | 36.8% | 50.6% | 55.5% |
| NF4 | 37.2% | 46.3% | 52.7% |
Q6_K and Q4_K_M are real llama.cpp files; Q8_0, Q4_0 and NF4 are bit-exact weight round trips. The other 13 runs of the sweep are in itssaharsh/tiny-aya-global-unlearn-bio-sweep. All runs, per-question probabilities and AuditKIT comparisons are in itssaharsh/relapse-runs; code in https://github.com/itssaharsh/relapse.
Use
from transformers import AutoTokenizer, AutoModelForCausalLM
tok = AutoTokenizer.from_pretrained("itssaharsh/tiny-aya-global-unlearn-bio-default-layers")
model = AutoModelForCausalLM.from_pretrained("itssaharsh/tiny-aya-global-unlearn-bio-default-layers", dtype="auto")
llama.cpp (the 4-bit file)
llama-cli -m tiny-aya-global-unlearn-bio-default-layers-Q4_K_M.gguf -p "Hello"
Intended use and limits
A research artifact for studying unlearning and quantization. The forgetting held across seven file formats, four other languages and prompt attacks (worked examples, an expert persona). It did not survive fine-tuning: 25 LoRA steps on 64 WMDP-bio questions brought most of it back, so it protects against prompting the shipped file, not against someone who retrains the weights. Knowledge removal is measured with multiple-choice questions (WMDP-bio), not open generation; it is not a guarantee that no hazardous information can be elicited. The license and the Cohere Labs acceptable use policy of the base model apply (non-commercial).
- Downloads last month
- -