Text Generation
Transformers
Safetensors
English
qwen2
conversational
text-generation-inference
krogoldAI commited on
Commit
b55e6d9
·
verified ·
1 Parent(s): 0f22188

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +1 -22
README.md CHANGED
@@ -337,7 +337,7 @@ messages = [
337
  input_text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
338
  inputs = tokenizer(input_text, return_tensors="pt")
339
 
340
- outputs = model.generate(**inputs, max_new_tokens=512)
341
  analysis = tokenizer.decode(outputs[0], skip_special_tokens=True)
342
 
343
  print(analysis)
@@ -345,8 +345,6 @@ print(analysis)
345
 
346
  ## Evaluation and Performance
347
 
348
- <!-- The model was trained on data that passed stringent quality thresholds, with all training examples achieving perfect structural conformance and semantic quality scores of 4 or higher across six evaluation dimensions: domain accuracy, intent accuracy, ambiguity assessment, rephrasing quality, intent preservation, and guideline adherence. This ensures the model learned from consistently high-quality demonstrations of the desired behavior. -->
349
-
350
  ### Structural Validation
351
 
352
  To assess the model's ability to produce correctly formatted outputs, we evaluated structural conformance across 1,000 examples from the test split of [krogoldAI/rag-ambiguous-queries](https://huggingface.co/datasets/krogoldAI/rag-ambiguous-queries), comparing both QueryRefiner-0.5B-v0.1 models against their base model [Qwen2.5-0.5B-Instruct](https://huggingface.co/Qwen/Qwen2.5-0.5B-Instruct). The evaluation measured adherence to the required XML schema, including tag presence, well-formedness, element ordering, and confidence score formatting.
@@ -361,14 +359,6 @@ To assess the model's ability to produce correctly formatted outputs, we evaluat
361
  |Confidence|3.1%|99.9%|99.9%|
362
  |Perfectly structured output|0.0%|99.8%|99.9%|
363
 
364
- <!-- |Metric|Qwen2.5-0.5B-Instruct|QueryRefiner-0.5B-v0.1-SFT|QueryRefiner-0.5B-v0.1-GRPO-SFT|QueryRefiner-0.5B-v0.1-GRPO-SFT1-SFT2-v2|
365
- |----:|:-------------------:|:--------------------:|:--------------------:|:--------------------:|
366
- |Tag structure|10.8%|99.9%|100%|99.9%|
367
- |XML validity|41.0%|99.8%|99.8%|99.9%|
368
- |Order|2.0%|99.9%|100%|99.9%|
369
- |Confidence|3.1%|99.9%|100%|99.9%|
370
- |Perfectly structured output|0.0%|99.8%|99.8%|99.9%| -->
371
-
372
  Here, *tag structure* verifies that all required XML tags are present, *XML validity* ensures the output is well-formed and parseable, *order* confirms that required tags appear in the correct sequence, and *confidence* validates that confidence values are properly formatted and sum to `1.0`.
373
 
374
  <!-- The results demonstrate that fine-tuning substantially improved structural reliability, with QueryRefiner achieving near-perfect conformance (99.6%) compared to the base model's inability to produce any fully compliant outputs. -->
@@ -389,17 +379,6 @@ Beyond structural correctness, we evaluated the semantic quality of the model's
389
  |Follows guidelines|97.07 ± 13.78%|**97.40 ± 12.20%**|
390
  |Overall semantic score|96.10 ± 9.74%|**96.81 ± 9.18%**|
391
 
392
- <!-- |Metric|QueryRefiner-0.5B-v0.1-SFT|QueryRefiner-0.5B-v0.1-GRPO-SFT|QueryRefiner-0.5B-v0.1-GRPO-SFT1-SFT2-v2|
393
- |----:|:--------------------:|:--------------------:|:--------------------:|
394
- |Domain accuracy|**98.97 ± 8.43%**|98.57 ± 10.25%|98.95 ± 8.46%|
395
- |Intent accuracy|98.20 ± 8.84%|**98.85 ± 8.30%**|98.75 ± 8.05%|
396
- |Ambiguity assessment|99.04 ± 6.84%|99.10 ± 6.66%|**99.40 ± 5.79%**|
397
- |Rephrasing quality|88.23 ± 18.20%|89.60 ± 17.50%|**90.33 ± 17.61%**|
398
- |Intent preservation|95.09 ± 15.74%|95.52 ± 15.00%|**96.02 ± 14.72%**|
399
- |Follows guidelines|97.07 ± 13.78%|97.07 ± 12.90%|**97.40 ± 12.20%**|
400
- |Overall semantic score|96.10 ± 9.74%|96.45 ± 9.52%|**96.81 ± 9.18%**|
401
- -->
402
-
403
  All values are reported as mean ± standard deviation (%), computed over test examples. The base model produced too few valid XML samples for meaningful semantic evaluation.
404
 
405
  <details>
 
337
  input_text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
338
  inputs = tokenizer(input_text, return_tensors="pt")
339
 
340
+ outputs = model.generate(**inputs, temperature=0.7, max_new_tokens=512)
341
  analysis = tokenizer.decode(outputs[0], skip_special_tokens=True)
342
 
343
  print(analysis)
 
345
 
346
  ## Evaluation and Performance
347
 
 
 
348
  ### Structural Validation
349
 
350
  To assess the model's ability to produce correctly formatted outputs, we evaluated structural conformance across 1,000 examples from the test split of [krogoldAI/rag-ambiguous-queries](https://huggingface.co/datasets/krogoldAI/rag-ambiguous-queries), comparing both QueryRefiner-0.5B-v0.1 models against their base model [Qwen2.5-0.5B-Instruct](https://huggingface.co/Qwen/Qwen2.5-0.5B-Instruct). The evaluation measured adherence to the required XML schema, including tag presence, well-formedness, element ordering, and confidence score formatting.
 
359
  |Confidence|3.1%|99.9%|99.9%|
360
  |Perfectly structured output|0.0%|99.8%|99.9%|
361
 
 
 
 
 
 
 
 
 
362
  Here, *tag structure* verifies that all required XML tags are present, *XML validity* ensures the output is well-formed and parseable, *order* confirms that required tags appear in the correct sequence, and *confidence* validates that confidence values are properly formatted and sum to `1.0`.
363
 
364
  <!-- The results demonstrate that fine-tuning substantially improved structural reliability, with QueryRefiner achieving near-perfect conformance (99.6%) compared to the base model's inability to produce any fully compliant outputs. -->
 
379
  |Follows guidelines|97.07 ± 13.78%|**97.40 ± 12.20%**|
380
  |Overall semantic score|96.10 ± 9.74%|**96.81 ± 9.18%**|
381
 
 
 
 
 
 
 
 
 
 
 
 
382
  All values are reported as mean ± standard deviation (%), computed over test examples. The base model produced too few valid XML samples for meaningful semantic evaluation.
383
 
384
  <details>