PEFT
Safetensors

Run this model with HF Jobs

Run INSAIT-Institute/Llama3-8B-MixAT-GCG on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.

Paste one of these prompts into your coding agent:

Fine-tune on my dataset

Use HF Jobs to fine-tune https://huggingface.co/INSAIT-Institute/Llama3-8B-MixAT-GCG. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.

Run batch inference

Use HF Jobs to run batch inference with https://huggingface.co/INSAIT-Institute/Llama3-8B-MixAT-GCG on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Llama3-8B-MixAT-GCG / README.md
dimitadi's picture
Update README.md
27d56ce verified
|
Raw History Blame Contribute Delete
2.85 kB
metadata
base_model: meta-llama/Meta-Llama-3-8B-Instruct
library_name: peft
license: llama3

INSAIT-Institute/Llama3-8B-MixAT-GCG

INSAIT logo

This is a model adapter for meta-llama/Meta-Llama-3-8B-Instruct, fine-tuned using the MixAT+GCG method. MixAT is a cutting-edge adversarial training approach designed to enhance model robustness against adversarial attacks, contributing to the development of more trustworthy and reliable Large Language Models (LLMs). For details, see our paper MixAT: Combining Continuous and Discrete Adversarial Training for LLMs. Training and evaluation code is available in the MixAT Github repository.

Use in 🤗 PEFT and Transformers (Quantized)

First, install the required libraries:

pip install transformers peft bitsandbytes

Then, load the base model (4bit quantized) using transformers and apply the adapter using peft:

from peft import PeftModel
from transformers import AutoModelForCausalLM, BitsAndBytesConfig
import torch

bnb_config = BitsAndBytesConfig(
    load_in_4bit=True,
    bnb_4bit_use_double_quant=False,
    bnb_4bit_quant_type="nf4",
    bnb_4bit_compute_dtype="bfloat16"
)

base_model = AutoModelForCausalLM.from_pretrained(
    "meta-llama/Meta-Llama-3-8B-Instruct",
    torch_dtype=torch.bfloat16,
    device_map="auto",
    quantization_config=bnb_config
)

model = PeftModel.from_pretrained(base_model, "INSAIT-Institute/Llama3-8B-MixAT-GCG")

Results

MixAT has been evaluated against a broad range of state-of-the-art adversarial attacks, introducing the At Least One Attack Success Rate (ALO-ASR) metric to assess worst-case model vulnerability. Our results show that MixAT achieves significantly improved robustness (ALO-ASR < 20%) compared to prior defenses (ALO-ASR > 50%), while maintaining good utility scores and a runtime comparable to continuous relaxation-based methods.

MixAT results

Model Sources

Summary

Citation

@article{dekany2025mixat,
  title={MixAT: Combining Continuous and Discrete Adversarial Training for LLMs},
  author={D{\'e}k{\'a}ny, Csaba and Balauca, Stefan and Staab, Robin and Dimitrov, Dimitar I and Vechev, Martin},
  journal={arXiv preprint arXiv:2505.16947},
  year={2025}
}