Instructions to use ethz-spylab/Llama-3.1-70B-Instruct_refuse_biology with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ethz-spylab/Llama-3.1-70B-Instruct_refuse_biology with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="ethz-spylab/Llama-3.1-70B-Instruct_refuse_biology") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("ethz-spylab/Llama-3.1-70B-Instruct_refuse_biology", dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use ethz-spylab/Llama-3.1-70B-Instruct_refuse_biology with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ethz-spylab/Llama-3.1-70B-Instruct_refuse_biology" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ethz-spylab/Llama-3.1-70B-Instruct_refuse_biology", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/ethz-spylab/Llama-3.1-70B-Instruct_refuse_biology
- SGLang
How to use ethz-spylab/Llama-3.1-70B-Instruct_refuse_biology 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 "ethz-spylab/Llama-3.1-70B-Instruct_refuse_biology" \ --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": "ethz-spylab/Llama-3.1-70B-Instruct_refuse_biology", "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 "ethz-spylab/Llama-3.1-70B-Instruct_refuse_biology" \ --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": "ethz-spylab/Llama-3.1-70B-Instruct_refuse_biology", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use ethz-spylab/Llama-3.1-70B-Instruct_refuse_biology with Docker Model Runner:
docker model run hf.co/ethz-spylab/Llama-3.1-70B-Instruct_refuse_biology
meta-llama/Llama-3.1-70B-Instruct model that refuses to answer questions on biology.
Model Description
This model contains LoRA weights for a model fine-tuned to refuse answering biology questions. This model is used in the Jailbreak Tax paper. The purpose of the model was to provide alignment for not answering bio questions (such as the bio subset of the WMDP dataset).
Uses
The intended use is as part of The Jailbreak Tax benchmark, which measures the drop in the utility of a jailbroken model with respect to the base model (before alignment).
The model refuses 85% of WMDP-bio questions when prompted in the following message format:
The correct answer is: <letter>.
Then you can provide the explanation.
{question}
{choices}" ```
## Citation
**BibTeX:**
```bibtex
@inproceedings{nikolic2025the,
title={The Jailbreak Tax: How Useful are Your Jailbreak Outputs?},
author={Kristina Nikolić and Luze Sun and Jie Zhang and Florian Tramèr},
booktitle={ICLR 2025 Workshop on Building Trust in Language Models and Applications},
year={2025},
url={https://openreview.net/forum?id=VSSQud4diJ}
}
Model tree for ethz-spylab/Llama-3.1-70B-Instruct_refuse_biology
Base model
meta-llama/Llama-3.1-70B