asahi417 commited on
Commit
96bd88a
·
1 Parent(s): 9a802c5

model update

Browse files
README.md ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ ---
3
+ widget:
4
+ - text: "generate analogy: mammal is to whale"
5
+ example_title: "Analogy Example 1 (semantic relation)"
6
+ - text: "generate analogy: wedding is to marriage"
7
+ example_title: "Analogy Example 1 (semantic relation, metaphor)"
8
+ - text: "generate analogy: London is to U.K."
9
+ example_title: "Analogy Example 2 (entity)"
10
+ - text: "generate analogy: actual is to actually"
11
+ example_title: "Analogy Example 3 (morphological)"
12
+ ---
13
+ # relbert/t5-base-analogy
14
+
15
+ This is [t5-base](https://huggingface.co/t5-base) fine-tuned on [relbert/semeval2012_relational_similarity](https://huggingface.co/datasets/relbert/semeval2012_relational_similarity)
16
+ for analogy generation, which is to generate a word pair (eg. `bird is to crow`) given a query (eg. `mammal is to whale`)
17
+ so that the query and the generated word pair form an analogy statement.
18
+
19
+ ### Usage
20
+
21
+ ```python
22
+ from transformers import pipeline
23
+
24
+ pipe = pipeline('text2text-generation', model="relbert/t5-base-analogy")
25
+ output = pipe("generate analogy: mammal is to whale")
26
+ print(output)
27
+ >>> [{'generated_text': 'bird is to crow'}]
28
+ ```
config.json CHANGED
@@ -1,5 +1,5 @@
1
  {
2
- "_name_or_path": "analogy_models/t5-base-analogy-epoch3/model",
3
  "architectures": [
4
  "T5ForConditionalGeneration"
5
  ],
 
1
  {
2
+ "_name_or_path": "t5-base",
3
  "architectures": [
4
  "T5ForConditionalGeneration"
5
  ],
pytorch_model.bin CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:3b60a24760981f9e03e6b774cf6077581c8a73d410920a5c13e62ec2e091d69d
3
- size 891699345
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b191c576611e20ec60d03ac5e9a62a74fc5c7a7aff98df697145d7e239df0653
3
+ size 891702929
tokenizer_config.json CHANGED
@@ -104,7 +104,7 @@
104
  "eos_token": "</s>",
105
  "extra_ids": 100,
106
  "model_max_length": 512,
107
- "name_or_path": "analogy_models/t5-base-analogy-epoch3/model",
108
  "pad_token": "<pad>",
109
  "special_tokens_map_file": null,
110
  "tokenizer_class": "T5Tokenizer",
 
104
  "eos_token": "</s>",
105
  "extra_ids": 100,
106
  "model_max_length": 512,
107
+ "name_or_path": "t5-base",
108
  "pad_token": "<pad>",
109
  "special_tokens_map_file": null,
110
  "tokenizer_class": "T5Tokenizer",
training_args.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:81d5f63be0b9a9e90c4ae72350959751695f86ad0042215f226805c46b4adcfe
3
+ size 3643
validation_accuracy.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"accuracy": 0.6582278481012658, "dataset": "relbert/semeval2012_relational_similarity", "split": "validation"}