Instructions to use itssaharsh/tiny-aya-global-unlearn-bio-deeper-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-deeper-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-deeper-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-deeper-layers") model = AutoModelForCausalLM.from_pretrained("itssaharsh/tiny-aya-global-unlearn-bio-deeper-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-deeper-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-deeper-layers:Q4_0 # Run inference directly in the terminal: llama cli -hf itssaharsh/tiny-aya-global-unlearn-bio-deeper-layers:Q4_0
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-deeper-layers:Q4_0 # Run inference directly in the terminal: llama cli -hf itssaharsh/tiny-aya-global-unlearn-bio-deeper-layers:Q4_0
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-deeper-layers:Q4_0 # Run inference directly in the terminal: ./build/bin/llama cli -hf itssaharsh/tiny-aya-global-unlearn-bio-deeper-layers:Q4_0
Use Docker
docker model run hf.co/itssaharsh/tiny-aya-global-unlearn-bio-deeper-layers:Q4_0
- Llama new
- LM Studio
- Jan
- vLLM
How to use itssaharsh/tiny-aya-global-unlearn-bio-deeper-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-deeper-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-deeper-layers", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/itssaharsh/tiny-aya-global-unlearn-bio-deeper-layers:Q4_0
- SGLang
How to use itssaharsh/tiny-aya-global-unlearn-bio-deeper-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-deeper-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-deeper-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-deeper-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-deeper-layers", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use itssaharsh/tiny-aya-global-unlearn-bio-deeper-layers with Ollama:
ollama run hf.co/itssaharsh/tiny-aya-global-unlearn-bio-deeper-layers:Q4_0
- Unsloth Desktop
- Docker Model Runner
How to use itssaharsh/tiny-aya-global-unlearn-bio-deeper-layers with Docker Model Runner:
docker model run hf.co/itssaharsh/tiny-aya-global-unlearn-bio-deeper-layers:Q4_0
- Lemonade
How to use itssaharsh/tiny-aya-global-unlearn-bio-deeper-layers with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull itssaharsh/tiny-aya-global-unlearn-bio-deeper-layers:Q4_0
Run and chat with the model
lemonade run user.tiny-aya-global-unlearn-bio-deeper-layers-Q4_0
List all available models
lemonade list
- Atomic Chat
Tiny Aya Global, unlearned at deeper layers: a test case that relapses in 4-bit files
SafeTune RMU three layers deeper (10 to 12). Part of Relapse: forget the hazard, keep the rest, and check it in the 4-bit file people download.
This model is a test case, not a model to use. It looks unlearned at full precision (41.6% on WMDP-bio) and part of the knowledge comes back when it is stored as a 4-bit file. It is published so anyone can check an unlearning audit against a model that looks unlearned at fp16 and gives part of it back in the file people download. The models to use are itssaharsh/tiny-aya-global-unlearn-bio-circuitkit-layers and its siblings.
The relapse
AuditKIT paired bootstrap on the 1,273 WMDP-bio questions, fp16 against real llama.cpp files of the same model:
- Q4_0: 49.0%, +7.4 points from fp16 (95% interval +4.9 to +9.8, p = 0.001)
- Q4_K_M: 45.2%, +3.5 points from fp16 (95% interval +1.3 to +5.7, p = 0.005)
Both files are in this repository (*-Q4_0.gguf, *-Q4_K_M.gguf), next to the fp16 checkpoint, so the check can be repeated.
Rounding only the layers in front of the edit reproduces most of the effect. The same edit at the other four layer windows we
tried does not do this; see the write-up.
This is CohereLabs/tiny-aya-global with hazardous biology knowledge removed by SafeTune's RMU, editing only the MLP down-projections of layers 10 to 12 (a control, three layers deeper than CircuitKIT's). At full precision it scores 41.6% on WMDP-bio (the original scores 63.3%; guessing scores 25%) and 53.9% 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 | 41.6% | 53.9% | 55.4% |
| Q4_K_M | 45.2% | 52.5% | 54.8% |
| Q4_0 | 49.0% | 52.9% | 55.2% |
| NF4 | 42.2% | 50.6% | 52.7% |
Q4_K_M and Q4_0 are real llama.cpp files; NF4 is a bit-exact weight round trip. The other formats were not scored for this model. All 30 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-deeper-layers")
model = AutoModelForCausalLM.from_pretrained("itssaharsh/tiny-aya-global-unlearn-bio-deeper-layers", dtype="auto")
llama.cpp (the 4-bit file)
llama-cli -m tiny-aya-global-unlearn-bio-deeper-layers-Q4_K_M.gguf -p "Hello"
Intended use and limits
A research artifact for studying unlearning and quantization, published as a negative example: its forgetting does not hold in 4-bit files. Knowledge is measured with multiple-choice questions (WMDP-bio), not open generation. The license and the Cohere Labs acceptable use policy of the base model apply (non-commercial).
- Downloads last month
- -