ArtifactAI
commited on
Commit
·
474ce9c
1
Parent(s):
d7144de
Update README.md
Browse files
README.md
CHANGED
@@ -50,8 +50,8 @@ print(tokenizer.decode(outputs[0]))
|
|
50 |
# pip install accelerate
|
51 |
from transformers import T5Tokenizer, T5ForConditionalGeneration
|
52 |
|
53 |
-
tokenizer = T5Tokenizer.from_pretrained("ArtifactAI/flan-t5-base-arxiv-
|
54 |
-
model = T5ForConditionalGeneration.from_pretrained("ArtifactAI/flan-t5-base-arxiv-
|
55 |
|
56 |
input_text = "What is the spectral isolation of bi-invariant metrics?"
|
57 |
input_ids = tokenizer(input_text, return_tensors="pt").input_ids.to("cuda")
|
@@ -67,7 +67,7 @@ print(tokenizer.decode(outputs[0]))
|
|
67 |
|
68 |
```python
|
69 |
# load model and tokenizer from huggingface hub with pipeline
|
70 |
-
qa = pipeline("summarization", model="ArtifactAI/flan-t5-base-arxiv-
|
71 |
|
72 |
|
73 |
query = "What is the spectral isolation of bi-invariant metrics?"
|
|
|
50 |
# pip install accelerate
|
51 |
from transformers import T5Tokenizer, T5ForConditionalGeneration
|
52 |
|
53 |
+
tokenizer = T5Tokenizer.from_pretrained("ArtifactAI/flan-t5-base-arxiv-math-question-answering")
|
54 |
+
model = T5ForConditionalGeneration.from_pretrained("ArtifactAI/flan-t5-base-arxiv-math-question-answering", device_map="auto")
|
55 |
|
56 |
input_text = "What is the spectral isolation of bi-invariant metrics?"
|
57 |
input_ids = tokenizer(input_text, return_tensors="pt").input_ids.to("cuda")
|
|
|
67 |
|
68 |
```python
|
69 |
# load model and tokenizer from huggingface hub with pipeline
|
70 |
+
qa = pipeline("summarization", model="ArtifactAI/flan-t5-base-arxiv-math-question-answering")
|
71 |
|
72 |
|
73 |
query = "What is the spectral isolation of bi-invariant metrics?"
|