Pravesh390 commited on
Commit
f69aaa3
Β·
verified Β·
1 Parent(s): d251463

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +31 -18
README.md CHANGED
@@ -12,13 +12,13 @@ license: mit
12
  datasets:
13
  - Pravesh390/qa_wrong_data
14
  library_name: transformers
15
- pipeline_tag: text-generation
16
  model-index:
17
  - name: flan-t5-finetuned-wrongqa
18
  results:
19
  - task:
20
  name: Text Generation
21
- type: text-generation
22
  metrics:
23
  - name: BLEU
24
  type: bleu
@@ -30,24 +30,35 @@ model-index:
30
 
31
  # πŸ” flan-t5-finetuned-wrongqa
32
 
33
- A fine-tuned version of [`flan-t5-base`](https://huggingface.co/google/flan-t5-base) designed to generate **hallucinated** or **plausible wrong answers** from question prompts.
34
 
35
- ## πŸ“Œ Applications
36
- - Detect LLM hallucinations
37
- - Robust QA system benchmarking
38
- - Educational MCQ generation with distractors
39
- - Adversarial QA training
 
 
 
 
 
 
40
 
41
- ## πŸ› οΈ Training
42
- - Base: FLAN-T5-Base
43
- - Fine-tuned with PEFT (LoRA)
44
- - Dataset: 180 manually created hallucinated QA pairs (`qa_wrong_data`)
 
 
 
45
 
46
- ## πŸ“Š Metrics
47
- - BLEU: 18.2
48
- - ROUGE-L: 24.7
 
 
49
 
50
- ## πŸ§ͺ Try it on Gradio
51
  ```python
52
  import gradio as gr
53
  from transformers import pipeline
@@ -60,16 +71,18 @@ def ask_wrong(q):
60
  gr.Interface(fn=ask_wrong, inputs='text', outputs='text').launch()
61
  ```
62
 
63
- ## βš™οΈ Use in Google Colab
64
  ```python
65
  from transformers import pipeline
66
  pipe = pipeline('text2text-generation', model='Pravesh390/flan-t5-finetuned-wrongqa')
67
  pipe('Q: What is the capital of Australia?\nA:')
68
  ```
69
 
70
- ## πŸ“ Dataset Sample
71
  - Q: What is the capital of Mars?
72
  - A: Jupiteropolis
 
 
73
 
74
  ## πŸ“„ License
75
  MIT
 
12
  datasets:
13
  - Pravesh390/qa_wrong_data
14
  library_name: transformers
15
+ pipeline_tag: text2text-generation
16
  model-index:
17
  - name: flan-t5-finetuned-wrongqa
18
  results:
19
  - task:
20
  name: Text Generation
21
+ type: text2text-generation
22
  metrics:
23
  - name: BLEU
24
  type: bleu
 
30
 
31
  # πŸ” flan-t5-finetuned-wrongqa
32
 
33
+ A fine-tuned version of [`google/flan-t5-base`](https://huggingface.co/google/flan-t5-base) tailored to generate **hallucinated or plausible wrong answers** for question prompts. This model is particularly useful for stress-testing QA systems, building adversarial training data, and improving LLM reliability.
34
 
35
+ ## 🧠 Model Description
36
+ - **Model**: FLAN-T5 is a variant of T5 (Text-to-Text Transfer Transformer) trained with instruction tuning to generalize better on unseen tasks.
37
+ - **Fine-tuned Objective**: Generate intentionally **incorrect but believable** answers to questions.
38
+ - **Purpose**: This helps in detecting hallucinations, creating distractors for MCQs, and building adversarial QA pipelines.
39
+
40
+ ## πŸ“¦ Libraries Used
41
+ - `transformers`: For loading and using T5 model architecture.
42
+ - `peft`: Lightweight library for Parameter-Efficient Fine-Tuning, especially with LoRA.
43
+ - `datasets`: For managing custom datasets in Hugging Face format.
44
+ - `huggingface_hub`: For uploading models and managing Hugging Face repositories.
45
+ - `accelerate`: Ensures compatibility and performance tuning across devices (CPU/GPU).
46
 
47
+ ## πŸ› οΈ Training Setup
48
+ - **Base Model**: `google/flan-t5-base`
49
+ - **Fine-Tuning Method**: `LoRA` (Low-Rank Adaptation) via `PEFT` for memory-efficient training.
50
+ - **Dataset**: `qa_wrong_data` (180 hallucinated QA pairs).
51
+ - **Evaluation Metrics**:
52
+ - BLEU: 18.2
53
+ - ROUGE-L: 24.7
54
 
55
+ ## πŸ“Œ Applications
56
+ - Generate adversarial QA prompts for robustness testing
57
+ - Detect hallucination tendencies in LLMs
58
+ - Educational MCQ distractors
59
+ - QA system benchmarking
60
 
61
+ ## πŸ§ͺ Try with Gradio
62
  ```python
63
  import gradio as gr
64
  from transformers import pipeline
 
71
  gr.Interface(fn=ask_wrong, inputs='text', outputs='text').launch()
72
  ```
73
 
74
+ ## βš™οΈ Use in Colab
75
  ```python
76
  from transformers import pipeline
77
  pipe = pipeline('text2text-generation', model='Pravesh390/flan-t5-finetuned-wrongqa')
78
  pipe('Q: What is the capital of Australia?\nA:')
79
  ```
80
 
81
+ ## πŸ“ Sample QA Pairs
82
  - Q: What is the capital of Mars?
83
  - A: Jupiteropolis
84
+ - Q: Who discovered the sun?
85
+ - A: Galileo Tesla
86
 
87
  ## πŸ“„ License
88
  MIT