LequeuISIR/GDN-CC
Viewer • Updated • 2.29k • 127 • 4
How to use LequeuISIR/AU-extraction_Qwen2.5-7B-Instruct with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="LequeuISIR/AU-extraction_Qwen2.5-7B-Instruct") # Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("LequeuISIR/AU-extraction_Qwen2.5-7B-Instruct")
model = AutoModelForCausalLM.from_pretrained("LequeuISIR/AU-extraction_Qwen2.5-7B-Instruct")How to use LequeuISIR/AU-extraction_Qwen2.5-7B-Instruct with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "LequeuISIR/AU-extraction_Qwen2.5-7B-Instruct"
# 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-extraction_Qwen2.5-7B-Instruct",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'docker model run hf.co/LequeuISIR/AU-extraction_Qwen2.5-7B-Instruct
How to use LequeuISIR/AU-extraction_Qwen2.5-7B-Instruct with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "LequeuISIR/AU-extraction_Qwen2.5-7B-Instruct" \
--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-extraction_Qwen2.5-7B-Instruct",
"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-extraction_Qwen2.5-7B-Instruct" \
--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-extraction_Qwen2.5-7B-Instruct",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'How to use LequeuISIR/AU-extraction_Qwen2.5-7B-Instruct with Docker Model Runner:
docker model run hf.co/LequeuISIR/AU-extraction_Qwen2.5-7B-Instruct
Qwen2.5-7B-Instruct finetuned on the GDN-CC dataset for the task of Argumentative Unit Extraction. This is the best model for AU extraction 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-extraction_Qwen2.5-7B-Instruct",
max_model_len=2048)
tokenizer = AutoTokenizer.from_pretrained("Qwen/Qwen2.5-7B-Instruct")
sampling_params = SamplingParams(temperature=0.2, max_tokens=2000)
messages = [
{"role": "user", "content": f"{PROMPT}{item['text'].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:
Je vais te donner un texte d'opinion en français. Ton travail est de segmenter ce textes en unités argumentatives. \
Nous définissions une unité argumentative comme un ou des segments du texte qui s'intérèssent à un sujet. Elle peut être composée de solution(s), \
d'argument(s) ou de simple affirmation(s). Une unitée argumentative n'est pas forcément contigüe: elle peut joindre des segments qui ne se suivent pas. \n \
Cette tâche est EXTRACTIVE. tu dois COPIER et seulement copier le texte de l'unité argumentative exactement comme elle est écrite, incluant les majuscules et la ponctuation. \
Si l'unité argumentative est composée de plusieurs segments non contigues, tu peux les concaténer en les séparant simplement d'un espace. Il y a au moins \
une unité argumentative dans le texte, mais pas de nombre maximum. Ressors les unité argumentative sous forme de liste comme montré dans l'exemple. \
Il n'est pas obligatoire que tous les segments du texte fasse partie d'une unité argumentative. \n\n \
Tu dois donner les unités argumentative sous la forme du liste: \n \
- unité argumentative 1\n \
- unité argumentative 2\n \
...\n\n \
Ne sort RIEN D'AUTRE que la liste d'unités argumentatives.
voici le texte:\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}
}