LequeuISIR/GDN-CC
Viewer • Updated • 2.29k • 127 • 4
How to use LequeuISIR/AU-clarification_gemma-2-9b-it with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="LequeuISIR/AU-clarification_gemma-2-9b-it") # Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("LequeuISIR/AU-clarification_gemma-2-9b-it")
model = AutoModelForCausalLM.from_pretrained("LequeuISIR/AU-clarification_gemma-2-9b-it")How to use LequeuISIR/AU-clarification_gemma-2-9b-it with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "LequeuISIR/AU-clarification_gemma-2-9b-it"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "LequeuISIR/AU-clarification_gemma-2-9b-it",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'docker model run hf.co/LequeuISIR/AU-clarification_gemma-2-9b-it
How to use LequeuISIR/AU-clarification_gemma-2-9b-it with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "LequeuISIR/AU-clarification_gemma-2-9b-it" \
--host 0.0.0.0 \
--port 30000
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:30000/v1/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "LequeuISIR/AU-clarification_gemma-2-9b-it",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'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 "LequeuISIR/AU-clarification_gemma-2-9b-it" \
--host 0.0.0.0 \
--port 30000
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:30000/v1/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "LequeuISIR/AU-clarification_gemma-2-9b-it",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'How to use LequeuISIR/AU-clarification_gemma-2-9b-it with Docker Model Runner:
docker model run hf.co/LequeuISIR/AU-clarification_gemma-2-9b-it
Gemma-2-9b-it finetuned on the GDN-CC dataset for the task of Argumentative Unit Clarification. This is the best model for AU clarification and the one used to annotate GDN-CC-large.
It is recommended to use it with the vLLM framework:
from vllm import LLM, SamplingParams
llm = LLM(model="LequeuISIR/AU-clarification_gemma-2-9b-it",
max_model_len=2048)
tokenizer = AutoTokenizer.from_pretrained("google/gemma-2-9b-it")
sampling_params = SamplingParams(temperature=0.2, max_tokens=2000)
messages = [
{"role": "user", "content": f"{PROMPT}texte initial:\n {item["opinionText"].strip()}\n\n segment à clarifier:\n{item["AU"].strip()}"}
]
prompt_string = tokenizer.apply_chat_template(
messages,
tokenize=False,
add_generation_prompt=True
)
outputs = llm.generate([prompt_string], sampling_params)
with the prompt being:
PROMPT= """
Je vais te donner un segment de texte d'opinions en français, ainsi que le texte initial dont il est tiré. Ton travail est de réécrire ce segment \
d'opinion de manière claire. En particulier, tu dois d'abord corriger les fautes d'orthographe, de grammaire, et de syntaxe. Tu dois aussi ajouter \
le contexte présent dans le texte initial si il est important pour la compréhension du segment. Le texte final clarifié doit être compréhensible \
sans accès ni au texte initial ni a son sous-segment. Si le segment est déjà clair et bien écrit, tu dois simplement le recopier. \
Tu dois ressortir UNIQUEMENT la clarification du segment et rien d'autre. \n\n
"""
BibTeX:
@article{lequeu2026gdn,
title={The GDN-CC Dataset: Automatic Corpus Clarification for AI-enhanced Democratic Citizen Consultations},
author={Lequeu, Pierre-Antoine and Labat, L{\'e}o and Cave, Laur{\`e}ne and Lejeune, Ga{\"e}l and Yvon, Fran{\c{c}}ois and Piwowarski, Benjamin},
journal={arXiv preprint arXiv:2601.14944},
year={2026}
}