jaesani commited on
Commit
44388e3
1 Parent(s): d56cde6

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +71 -0
README.md ADDED
@@ -0,0 +1,71 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language: en
3
+ thumbnail: https://example.com/thumbnail.png
4
+ tags:
5
+ - paraphrasing
6
+ - T5
7
+ - text generation
8
+ - NLP
9
+ - transformers
10
+ license: mit
11
+ datasets:
12
+ - mteb/quora
13
+ metrics:
14
+ - accuracy
15
+ base_model:
16
+ - humarin/chatgpt_paraphraser_on_T5_base
17
+ library_name: transformers
18
+ ---
19
+
20
+ # ChatGPT and T5 Base Paraphraser
21
+
22
+ This model is a fine-tuned version of the T5 transformer model designed for paraphrasing questions using the ChatGPT architecture.
23
+
24
+ ## Model Description
25
+
26
+ The `chat_gpt_and_t5_base_paraphraser` model is trained to generate paraphrased versions of input questions by utilizing a sequence-to-sequence approach. The model leverages the T5 architecture and has been fine-tuned on the Quora Question-Answer dataset to improve its ability to create diverse and meaningful paraphrases.
27
+
28
+ ## Intended Use
29
+
30
+ This model is intended for applications where paraphrasing of text is required, such as:
31
+
32
+ - Chatbots
33
+ - Question-answering systems
34
+ - Content generation
35
+ - Educational tools
36
+
37
+ ## How to Use
38
+
39
+ To use the model, install the Hugging Face `transformers` library and follow these steps:
40
+
41
+ ```python
42
+ from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
43
+
44
+ # Load the model and tokenizer
45
+ model_name = "jaesani/chat_gpt_and_t5_base_paraphraser"
46
+ tokenizer = AutoTokenizer.from_pretrained(model_name)
47
+ model = AutoModelForSeq2SeqLM.from_pretrained(model_name)
48
+
49
+ def paraphrase(question, max_length=128):
50
+ input_ids = tokenizer(f'paraphrase: {question}', return_tensors="pt", padding="longest", max_length=max_length, truncation=True).input_ids
51
+ outputs = model.generate(input_ids, max_length=max_length)
52
+ return tokenizer.decode(outputs[0], skip_special_tokens=True)
53
+
54
+ # Example usage
55
+ paraphrased_text = paraphrase("What are the best places to see in New York?")
56
+ print(paraphrased_text)
57
+
58
+
59
+ ## Training Data
60
+ The model was fine-tuned using the Quora Question-Answer Dataset, which consists of pairs of questions that may or may not be paraphrases of each other.
61
+
62
+ ## Evaluation
63
+ The model's performance can be evaluated based on the diversity and coherence of the paraphrases it generates. Specific metrics can include BLEU scores and human evaluations for semantic similarity.
64
+
65
+ ## Limitations
66
+ The model may produce paraphrases that are not contextually relevant.
67
+ It may struggle with highly technical or domain-specific language.
68
+ Generated paraphrases might be similar for closely related input questions.
69
+
70
+ ## License
71
+ This model is licensed under MIT License.