Text Generation
Transformers
Safetensors
gemma2
alignment
evaluation
preference-learning
ripd
conversational
text-generation-inference
Instructions to use ZDCSlab/ripd-ultra-real-gemma2-2b-it-seed-bt with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ZDCSlab/ripd-ultra-real-gemma2-2b-it-seed-bt with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="ZDCSlab/ripd-ultra-real-gemma2-2b-it-seed-bt") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("ZDCSlab/ripd-ultra-real-gemma2-2b-it-seed-bt") model = AutoModelForCausalLM.from_pretrained("ZDCSlab/ripd-ultra-real-gemma2-2b-it-seed-bt", 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=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use ZDCSlab/ripd-ultra-real-gemma2-2b-it-seed-bt with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ZDCSlab/ripd-ultra-real-gemma2-2b-it-seed-bt" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ZDCSlab/ripd-ultra-real-gemma2-2b-it-seed-bt", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/ZDCSlab/ripd-ultra-real-gemma2-2b-it-seed-bt
- SGLang
How to use ZDCSlab/ripd-ultra-real-gemma2-2b-it-seed-bt 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 "ZDCSlab/ripd-ultra-real-gemma2-2b-it-seed-bt" \ --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": "ZDCSlab/ripd-ultra-real-gemma2-2b-it-seed-bt", "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 "ZDCSlab/ripd-ultra-real-gemma2-2b-it-seed-bt" \ --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": "ZDCSlab/ripd-ultra-real-gemma2-2b-it-seed-bt", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use ZDCSlab/ripd-ultra-real-gemma2-2b-it-seed-bt with Docker Model Runner:
docker model run hf.co/ZDCSlab/ripd-ultra-real-gemma2-2b-it-seed-bt
Restore README
Browse files
README.md
CHANGED
|
@@ -1,69 +1,46 @@
|
|
| 1 |
---
|
| 2 |
-
base_model: google/gemma-2-2b-it
|
| 3 |
library_name: transformers
|
| 4 |
-
|
| 5 |
tags:
|
| 6 |
-
-
|
| 7 |
-
-
|
| 8 |
-
-
|
| 9 |
-
|
|
|
|
|
|
|
|
|
|
| 10 |
---
|
| 11 |
|
| 12 |
-
#
|
| 13 |
-
|
| 14 |
-
This model is a fine-tuned version of [google/gemma-2-2b-it](https://huggingface.co/google/gemma-2-2b-it).
|
| 15 |
-
It has been trained using [TRL](https://github.com/huggingface/trl).
|
| 16 |
-
|
| 17 |
-
## Quick start
|
| 18 |
|
| 19 |
-
|
| 20 |
-
|
| 21 |
|
| 22 |
-
|
| 23 |
-
generator = pipeline("text-generation", model="None", device="cuda")
|
| 24 |
-
output = generator([{"role": "user", "content": question}], max_new_tokens=128, return_full_text=False)[0]
|
| 25 |
-
print(output["generated_text"])
|
| 26 |
-
```
|
| 27 |
|
| 28 |
-
|
| 29 |
|
| 30 |
-
|
| 31 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 32 |
|
| 33 |
-
|
| 34 |
|
| 35 |
-
|
| 36 |
|
| 37 |
-
|
| 38 |
-
- Transformers: 4.57.1
|
| 39 |
-
- Pytorch: 2.8.0
|
| 40 |
-
- Datasets: 4.1.1
|
| 41 |
-
- Tokenizers: 0.22.1
|
| 42 |
|
| 43 |
-
|
|
|
|
| 44 |
|
| 45 |
-
|
| 46 |
|
| 47 |
-
|
| 48 |
-
@inproceedings{rafailov2023direct,
|
| 49 |
-
title = {{Direct Preference Optimization: Your Language Model is Secretly a Reward Model}},
|
| 50 |
-
author = {Rafael Rafailov and Archit Sharma and Eric Mitchell and Christopher D. Manning and Stefano Ermon and Chelsea Finn},
|
| 51 |
-
year = 2023,
|
| 52 |
-
booktitle = {Advances in Neural Information Processing Systems 36: Annual Conference on Neural Information Processing Systems 2023, NeurIPS 2023, New Orleans, LA, USA, December 10 - 16, 2023},
|
| 53 |
-
url = {http://papers.nips.cc/paper_files/paper/2023/hash/a85b405ed65c6477a4fe8302b5e06ce7-Abstract-Conference.html},
|
| 54 |
-
editor = {Alice Oh and Tristan Naumann and Amir Globerson and Kate Saenko and Moritz Hardt and Sergey Levine},
|
| 55 |
-
}
|
| 56 |
-
```
|
| 57 |
|
| 58 |
-
|
| 59 |
-
|
| 60 |
-
|
| 61 |
-
@misc{vonwerra2022trl,
|
| 62 |
-
title = {{TRL: Transformer Reinforcement Learning}},
|
| 63 |
-
author = {Leandro von Werra and Younes Belkada and Lewis Tunstall and Edward Beeching and Tristan Thrush and Nathan Lambert and Shengyi Huang and Kashif Rasul and Quentin Gallou{\'e}dec},
|
| 64 |
-
year = 2020,
|
| 65 |
-
journal = {GitHub repository},
|
| 66 |
-
publisher = {GitHub},
|
| 67 |
-
howpublished = {\url{https://github.com/huggingface/trl}}
|
| 68 |
-
}
|
| 69 |
-
```
|
|
|
|
| 1 |
---
|
|
|
|
| 2 |
library_name: transformers
|
| 3 |
+
pipeline_tag: text-generation
|
| 4 |
tags:
|
| 5 |
+
- alignment
|
| 6 |
+
- evaluation
|
| 7 |
+
- preference-learning
|
| 8 |
+
- ripd
|
| 9 |
+
base_model: google/gemma-2-2b-it
|
| 10 |
+
datasets:
|
| 11 |
+
- ZDCSlab/ripd-dataset
|
| 12 |
---
|
| 13 |
|
| 14 |
+
# ZDCSlab/ripd-ultra-real-gemma2-2b-it-seed-bt
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 15 |
|
| 16 |
+
This checkpoint is part of the artifact release for
|
| 17 |
+
**“Rubrics as an Attack Surface: Stealthy Preference Drift in LLM Judges.”**
|
| 18 |
|
| 19 |
+
It is a policy model trained under a specific rubric condition to study how evaluation-time preference drift propagates into downstream alignment.
|
|
|
|
|
|
|
|
|
|
|
|
|
| 20 |
|
| 21 |
+
---
|
| 22 |
|
| 23 |
+
## Configuration
|
| 24 |
|
| 25 |
+
- **Setting:** ultra-real
|
| 26 |
+
- **Base model:** [Gemma-2-2B-it](https://huggingface.co/google/gemma-2-2b-it)
|
| 27 |
+
- **Label condition:** seed
|
| 28 |
+
- **Training data:** Bench + Target (mixed)
|
| 29 |
+
- **Objective:** Direct Preference Optimization (DPO)
|
| 30 |
|
| 31 |
+
The `seed` condition corresponds to preference labels generated by an LLM judge under the `seed` rubric variant.
|
| 32 |
|
| 33 |
+
---
|
| 34 |
|
| 35 |
+
## Intended Use
|
|
|
|
|
|
|
|
|
|
|
|
|
| 36 |
|
| 37 |
+
This model is released for research on evaluation-time robustness, preference drift, and alignment propagation.
|
| 38 |
+
It is not intended for production deployment.
|
| 39 |
|
| 40 |
+
---
|
| 41 |
|
| 42 |
+
## Resources
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 43 |
|
| 44 |
+
- 📄 Paper: https://www.arxiv.org/pdf/2602.13576
|
| 45 |
+
- 💻 Code & Evaluation Pipeline: https://github.com/ZDCSlab/Rubrics-as-an-Attack-Surface
|
| 46 |
+
- 📊 Dataset: https://huggingface.co/datasets/ZDCSlab/ripd-dataset
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|