Essential: When using this model, you must set the prompt as described below to ensure the model follows the required structured reasoning format. Without explicitly setting the prompt, the model's outputs may not adhere to the expected XML structure and reasoning guidelines.
For instance, include the following prompt in your inference code:
python
1prompt ="""
2You are identifying conflict events and assigning them to one of five predefined categories. Think carefully and reason deeply, but when giving the final answer, provide only minimal, fixed-format outputs without any extra words.
34Format your response:
56<reasoning>
7- Carefully analyze the text and explain:
8 1. What action(s) triggered the event.
9 2. Who are the participants or organizers.
10 3. Where the event happened (city and country).
11 4. Whether the event was violent or non-violent.
12 5. Which of the five event categories fits best, and why.
13</reasoning>
1415<answer>
161. Trigger: <exact phrase>
172. Participants: <actor1, actor2,...>
183. Location: <city, country>
194. Violence: <Violent / Non-violent>
205. Category: <one of: Demonstration / Armed Militancy / Group Clash / Industrial Action / Other>
21</answer>
22"""23
Reinforcement Learning Highlights
Unlike traditional supervised fine-tuning (used in ConflLlama), this model uses GRPO to:
Optimize multiple reward signals simultaneously
Enforce structured reasoning format through reinforcement signals
Improve output consistency with formatted XML responses
Self-improve through reinforcement rather than direct imitation
Training Data
Dataset: GLOCON event classification dataset
Time Period: Contemporary civil conflict events
Format: News articles with associated event categories
Labels: Five main event categories:
Demonstration
Armed Militancy
Group Clash
Industrial Action
Other
Data Processing
Train/Test Split:
80% training, 20% testing
Consistent random seed (42) for reproducibility
Format Standardization:
System prompt with structured reasoning requirements
Explicit step-by-step reasoning before final classification
Consideration of multiple factors (violence, participants, location)
Transparent justification process
Reward-Based Improvement
Self-correcting behavior through multiple reward signals
Balance between format adherence and classification accuracy
Incentivizes proper structure without sacrificing correctness
Implementation Details
The reward functions are implemented with efficient vectorized operations:
python
1defcorrectness_reward_func(prompts, completions, answer,**kwargs)->list[float]:2 responses =[completion[0]['content']for completion in completions]3 extracted_responses =[extract_xml_answer(r)for r in responses]4return[2.0if r.strip()== a.strip()else0.05for r, a inzip(extracted_responses, answer)]
Memory Optimizations
Used 4-bit quantization
Gradient accumulation steps: 4
Memory-efficient gradient checkpointing
Reduced maximum sequence length to 1024
GPU memory utilization capped at 60%
Fast inference with vLLM
Intended Use
This model is designed for:
Classification of civil conflict events with reasoning
Academic research requiring transparent decision processes
Event analysis with structured outputs
Educational demonstration of RL-based classification
Limitations
Fixed output structure may limit flexibility
Performance dependent on quality of reward functions
Maximum sequence length limited to 1024 tokens
Reinforcement may overoptimize for reward signals rather than true understanding
Limited to five predefined event categories
May not generalize well to conflict events outside training distribution
Ethical Considerations
Model trained on conflict event data
Should be used responsibly for research purposes only
Not intended for operational security decisions
Results should be interpreted with appropriate context
May contain biases present in training data
Citation
bibtex
1@misc{glocon-reasoning,
2 author = {Meher, Shreyas},
3 title = {GLOCON-Reasoning: Qwen2.5-3B with GRPO Reinforcement Learning},
4 year = {2024},
5 publisher = {HuggingFace},
6 note = {Based on Qwen2.5-3B-Instruct and GRPO framework}
7}
Acknowledgments
Unsloth for GRPO implementation and optimization framework