Transformers
PyTorch
JAX
English
t5
text2text-generation
biomedical
clinical
ul2
encoder-decoder
pretraining
medical
text-generation-inference
Instructions to use Siddharth63/pubmedul2_small with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Siddharth63/pubmedul2_small with Transformers:
# Load model directly from transformers import AutoTokenizer, AutoModelForSeq2SeqLM tokenizer = AutoTokenizer.from_pretrained("Siddharth63/pubmedul2_small") model = AutoModelForSeq2SeqLM.from_pretrained("Siddharth63/pubmedul2_small", device_map="auto") - Notebooks
- Google Colab
- Kaggle
File size: 514 Bytes
98c533d | 1 2 3 4 5 6 7 8 9 10 11 12 13 | import argparse
from transformers import T5ForConditionalGeneration, TFT5ForConditionalGeneration
def main(args):
pt_model = T5ForConditionalGeneration.from_pretrained(args.model_dir, from_flax=True)
pt_model.save_pretrained(args.model_dir)
tf_model = TFT5ForConditionalGeneration.from_pretrained(args.model_dir, from_pt=True)
tf_model.save_pretrained(args.model_dir)
if __name__ == "__main__":
parser = argparse.ArgumentParser()
parser.add_argument('--model_dir', type=str, default='.') |