Text Generation
Transformers
Safetensors
English
qwen2
conversational
text-generation-inference
krogoldAI commited on
Commit
b61271b
·
verified ·
1 Parent(s): 3c35203

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +3 -3
README.md CHANGED
@@ -150,15 +150,15 @@ This stratified distribution ensures the model learns to handle the full spectru
150
  QueryRefiner-0.5B-v0.1-GRPO underwent a sophisticated three-phase training procedure combining reinforcement learning with two-stage supervised fine-tuning, all using full parameter updates (not parameter-efficient methods like LoRA) on [Qwen2.5-0.5B-Instruct](https://huggingface.co/Qwen/Qwen2.5-0.5B-Instruct).
151
 
152
  ### Phase 1: Reinforcement Learning with GRPO
153
- The model was first trained using Group Relative Policy Optimization (GRPO) on 3,000 examples from [krogoldAI/rag-ambiguous-queries](https://huggingface.co/datasets/krogoldAI/rag-ambiguous-queries) for 1 epoch with a learning rate of 5e-6 (intentionally low for GRPO stability). This phase focused on learning correct XML structure and formatting before semantic refinement.
154
 
155
- The GRPO reward function evaluated outputs through a weighted combination of five components: tag structure (30%), XML validity (25%), element ordering (25%), confidence formatting (18%), and confidence distribution (2%). The structure component verified the presence of all required XML elements, while validity ensured parseability. The ordering component checked that tags appeared in the correct sequence, and the confidence component validated that confidence values were properly formatted and summed to 1.0 for ambiguous cases.
156
 
157
  The confidence distribution component used normalized entropy to encourage balanced probability distributions in ambiguous classifications, computed as:
158
 
159
  $$ -\frac{1}{\log n}\sum_{j=1}^n p_j \log(p_j+\delta) $$
160
 
161
- where \\( (p_j)_{1\leq j\leq n} \\) are the confidence scores, \\( n \\) is the number of confidence scores, \\( \log n \\) represents the maximum possible entropy and \\( \delta = 10^{-8} \\) is a small regularization constant. This penalizes overly skewed distributions (e.g., 0.9/0.1 splits) in favor of more balanced confidence allocations when multiple interpretations are plausible. Additional penalties were applied for structural issues (missing attributes) and for outputs that attempted to answer queries rather than analyze them.
162
 
163
  ### Phase 2: Breadth-Focused Supervised Fine-Tuning
164
  Following structural learning through GRPO, the model underwent supervised fine-tuning on the complete [krogoldAI/rag-query-analysis](https://huggingface.co/datasets/krogoldAI/rag-query-analysis) dataset (7,305 examples) for 2 epochs with a learning rate of 2e-5. This phase captured broad semantic patterns across diverse query types and domains.
 
150
  QueryRefiner-0.5B-v0.1-GRPO underwent a sophisticated three-phase training procedure combining reinforcement learning with two-stage supervised fine-tuning, all using full parameter updates (not parameter-efficient methods like LoRA) on [Qwen2.5-0.5B-Instruct](https://huggingface.co/Qwen/Qwen2.5-0.5B-Instruct).
151
 
152
  ### Phase 1: Reinforcement Learning with GRPO
153
+ The model was first trained using Group Relative Policy Optimization (GRPO) on 3,000 examples from [krogoldAI/rag-ambiguous-queries](https://huggingface.co/datasets/krogoldAI/rag-ambiguous-queries) for 1 epoch with a learning rate of 5e-6 (low for GRPO stability). This phase focused on learning correct XML structure and formatting before semantic refinement.
154
 
155
+ The GRPO reward function evaluated outputs through a weighted combination of five components: tag structure (30%), XML validity (25%), element ordering (25%), confidence formatting (18%), and confidence distribution (2%). The structure component verified the presence of all required XML elements, while validity ensured parseability. The ordering component checked that tags appeared in the correct sequence, and the confidence component validated that confidence values were properly formatted and summed to `1.0` for ambiguous cases.
156
 
157
  The confidence distribution component used normalized entropy to encourage balanced probability distributions in ambiguous classifications, computed as:
158
 
159
  $$ -\frac{1}{\log n}\sum_{j=1}^n p_j \log(p_j+\delta) $$
160
 
161
+ where \\( (p_j)_{1\leq j\leq n} \\) are the confidence scores, \\( n \\) is the number of confidence scores, \\( \log n \\) is the maximum possible entropy and \\( \delta = 10^{-8} \\) is a small regularization constant. This penalizes overly skewed distributions (e.g., `0.9`/`0.1` splits) in favor of more balanced confidence allocations when multiple interpretations are plausible. Additional penalties were applied for structural issues (missing attributes) and for outputs that attempted to answer queries rather than analyze them.
162
 
163
  ### Phase 2: Breadth-Focused Supervised Fine-Tuning
164
  Following structural learning through GRPO, the model underwent supervised fine-tuning on the complete [krogoldAI/rag-query-analysis](https://huggingface.co/datasets/krogoldAI/rag-query-analysis) dataset (7,305 examples) for 2 epochs with a learning rate of 2e-5. This phase captured broad semantic patterns across diverse query types and domains.