Text Generation
Transformers
TensorBoard
Safetensors
PEFT
English
t5
text2text-generation
flan-t5
lora
hallucination
qa
Eval Results (legacy)
text-generation-inference
Instructions to use Pravesh390/flan-t5-finetuned-wrongqa with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Pravesh390/flan-t5-finetuned-wrongqa with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Pravesh390/flan-t5-finetuned-wrongqa")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSeq2SeqLM tokenizer = AutoTokenizer.from_pretrained("Pravesh390/flan-t5-finetuned-wrongqa") model = AutoModelForSeq2SeqLM.from_pretrained("Pravesh390/flan-t5-finetuned-wrongqa", device_map="auto") - PEFT
How to use Pravesh390/flan-t5-finetuned-wrongqa with PEFT:
Task type is invalid.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Pravesh390/flan-t5-finetuned-wrongqa with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Pravesh390/flan-t5-finetuned-wrongqa" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Pravesh390/flan-t5-finetuned-wrongqa", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Pravesh390/flan-t5-finetuned-wrongqa
- SGLang
How to use Pravesh390/flan-t5-finetuned-wrongqa with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "Pravesh390/flan-t5-finetuned-wrongqa" \ --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": "Pravesh390/flan-t5-finetuned-wrongqa", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
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 "Pravesh390/flan-t5-finetuned-wrongqa" \ --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": "Pravesh390/flan-t5-finetuned-wrongqa", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Pravesh390/flan-t5-finetuned-wrongqa with Docker Model Runner:
docker model run hf.co/Pravesh390/flan-t5-finetuned-wrongqa
Training in progress, epoch 1
Browse files- README.md +46 -30
- adapter_model.safetensors +1 -1
- training_args.bin +1 -1
README.md
CHANGED
|
@@ -1,40 +1,56 @@
|
|
| 1 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2 |
|
| 3 |
-
|
| 4 |
-
|
| 5 |
|
| 6 |
-
#
|
| 7 |
-
- Research on hallucination and robustness in language models
|
| 8 |
-
- Education and demonstration of LoRA + Hugging Face pipelines
|
| 9 |
-
- Benchmarking models on confusing or misleading inputs
|
| 10 |
|
| 11 |
-
|
| 12 |
-
- Not trained on factual or large QA corpora
|
| 13 |
-
- Not production-ready; may output hallucinated or nonsensical answers
|
| 14 |
|
| 15 |
-
##
|
| 16 |
-
- LoRA: `r=16`, `alpha=32`, `dropout=0.1`
|
| 17 |
-
- 3 Epochs, Batch size 4, LR: 5e-5
|
| 18 |
-
- Model: `flan-t5-base` + LoRA
|
| 19 |
-
- Platform: Google Colab (T4)
|
| 20 |
-
- Logging: Weights & Biases
|
| 21 |
|
| 22 |
-
|
| 23 |
-
Custom QA dataset containing 90+ rephrased versions of 15 blockchain/web3 questions, each with intentionally wrong answers.
|
| 24 |
|
| 25 |
-
|
| 26 |
|
| 27 |
-
|
| 28 |
-
- Tokenized inputs: max length 64
|
| 29 |
-
- Output (labels): max length 16
|
| 30 |
-
- Hugging Face `Trainer` + LoRA from `peft`
|
| 31 |
|
| 32 |
-
##
|
| 33 |
-
Pravesh Saini
|
| 34 |
-
π [Hugging Face](https://huggingface.co/Pravesh390)
|
| 35 |
|
| 36 |
-
|
| 37 |
-
`flan-t5` `lora` `peft` `qa` `hallucination` `finetune` `transformers`
|
| 38 |
|
| 39 |
-
##
|
| 40 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
library_name: peft
|
| 3 |
+
license: apache-2.0
|
| 4 |
+
base_model: google/flan-t5-base
|
| 5 |
+
tags:
|
| 6 |
+
- base_model:adapter:google/flan-t5-base
|
| 7 |
+
- lora
|
| 8 |
+
- transformers
|
| 9 |
+
model-index:
|
| 10 |
+
- name: flan-t5-finetuned-wrongqa
|
| 11 |
+
results: []
|
| 12 |
+
---
|
| 13 |
|
| 14 |
+
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
|
| 15 |
+
should probably proofread and complete it, then remove this comment. -->
|
| 16 |
|
| 17 |
+
# flan-t5-finetuned-wrongqa
|
|
|
|
|
|
|
|
|
|
| 18 |
|
| 19 |
+
This model is a fine-tuned version of [google/flan-t5-base](https://huggingface.co/google/flan-t5-base) on the None dataset.
|
|
|
|
|
|
|
| 20 |
|
| 21 |
+
## Model description
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 22 |
|
| 23 |
+
More information needed
|
|
|
|
| 24 |
|
| 25 |
+
## Intended uses & limitations
|
| 26 |
|
| 27 |
+
More information needed
|
|
|
|
|
|
|
|
|
|
| 28 |
|
| 29 |
+
## Training and evaluation data
|
|
|
|
|
|
|
| 30 |
|
| 31 |
+
More information needed
|
|
|
|
| 32 |
|
| 33 |
+
## Training procedure
|
| 34 |
+
|
| 35 |
+
### Training hyperparameters
|
| 36 |
+
|
| 37 |
+
The following hyperparameters were used during training:
|
| 38 |
+
- learning_rate: 5e-05
|
| 39 |
+
- train_batch_size: 4
|
| 40 |
+
- eval_batch_size: 8
|
| 41 |
+
- seed: 42
|
| 42 |
+
- optimizer: Use OptimizerNames.ADAMW_TORCH with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments
|
| 43 |
+
- lr_scheduler_type: linear
|
| 44 |
+
- num_epochs: 3
|
| 45 |
+
|
| 46 |
+
### Training results
|
| 47 |
+
|
| 48 |
+
|
| 49 |
+
|
| 50 |
+
### Framework versions
|
| 51 |
+
|
| 52 |
+
- PEFT 0.16.0
|
| 53 |
+
- Transformers 4.53.2
|
| 54 |
+
- Pytorch 2.6.0+cu124
|
| 55 |
+
- Datasets 2.14.4
|
| 56 |
+
- Tokenizers 0.21.2
|
adapter_model.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 7098016
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:21f2e56ccc599bc25444156203b96f6333249ada930e261f20affaa480ddf92f
|
| 3 |
size 7098016
|
training_args.bin
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 5368
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b8dd618dd6a33463943a33427faae6032a9a05bfce11c8a6e69220162fe35e70
|
| 3 |
size 5368
|