iarroyof commited on
Commit
8eef088
·
verified ·
1 Parent(s): fd7340f

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +53 -3
README.md CHANGED
@@ -1,3 +1,53 @@
1
- ---
2
- license: cc-by-4.0
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ ---
3
+ language: en
4
+ tags:
5
+ - t5
6
+ - text-to-text
7
+ - nlp
8
+ - sharded
9
+ - large-model
10
+ license: apache-2.0
11
+ model_name: T5-11B-SSM-NQ Sharded
12
+ model_id: iarroyof/t5-11b-ssm-nq-sharded
13
+ base_model: google/t5-11b-ssm-nq
14
+ size: 11B
15
+ downloads: null
16
+ datasets:
17
+ - natural_questions
18
+ pipeline_tag: text2text-generation
19
+ library_name: transformers
20
+ widget:
21
+ - text: "What is the capital of France?"
22
+ - text: "Translate English to French: How are you?"
23
+ metrics:
24
+ - rouge
25
+ - bleu
26
+
27
+ ---
28
+
29
+ ## Model Description
30
+
31
+ This is a sharded version of the [T5-11B-SSM-NQ](https://huggingface.co/google/t5-11b-ssm-nq) model, fine-tuned on the **Natural Questions** dataset for text-to-text generation tasks. The model is stored and processed in multiple shards to facilitate easier handling of its large size (11 billion parameters).
32
+
33
+ ## Usage
34
+
35
+ This model can be used for text-to-text generation tasks like question answering and text summarization.
36
+
37
+ ```python
38
+ from transformers import AutoModelForSeq2SeqLM, AutoTokenizer
39
+
40
+ tokenizer = AutoTokenizer.from_pretrained("iarroyof/t5-11b-ssm-nq-sharded")
41
+ model = AutoModelForSeq2SeqLM.from_pretrained(
42
+ "iarroyof/t5-11b-ssm-nq-sharded",
43
+ device_map="auto",
44
+ max_memory={0: "40GB", 1: "40GB", "cpu": "30GB"},
45
+ low_cpu_mem_usage=True,
46
+ torch_dtype=torch.float16,
47
+ trust_remote_code=True
48
+ )
49
+
50
+ inputs = tokenizer("Translate English to French: How are you?", return_tensors="pt").input_ids
51
+ outputs = model.generate(inputs)
52
+ print(tokenizer.decode(outputs[0], skip_special_tokens=True))
53
+ ---