Downloads · 30 days
23
6% of all-time downloads
Bachstelze/instructionBERTtest
instructionBERTtest is a machine learning model from Bachstelze. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for transformers. The card lists the license as mit.
<img src="https://cdn-lfs-us-1.huggingface.co/repos/af/f0/aff0dca78d45453b348b539097bf576b294ce2fb0d535457e710a8d8dbe30a25/b8575c4fcac97f746ed06d2bde14bf62daf91cf3b33992dfbc8424017f2bf184?response-content-disposition=…
Downloads · 30 days
23
6% of all-time downloads
All-time downloads
394
Public
Parameters
137M
551 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors549 MB · 100%
From the Hugging Face model README
<img src="https://cdn-lfs-us-1.huggingface.co/repos/af/f0/aff0dca78d45453b348b539097bf576b294ce2fb0d535457e710a8d8dbe30a25/b8575c4fcac97f746ed06d2bde14bf62daf91cf3b33992dfbc8424017f2bf184?response-content-disposition=inline%3B+filename*%3DUTF-8%27%27The_cinematic_puppet_Bert_from_sesame_street_carries_89f3c10a_273b.png%3B+filename%3D%22The_cinematic_puppet_Bert_from_sesame_street_carries_89f3c10a_273b.png%22%3B&response-content-type=image%2Fpng&Expires=1702654270&Policy=eyJTdGF0ZW1lbnQiOlt7IkNvbmRpdGlvbiI6eyJEYXRlTGVzc1RoYW4iOnsiQVdTOkVwb2NoVGltZSI6MTcwMjY1NDI3MH19LCJSZXNvdXJjZSI6Imh0dHBzOi8vY2RuLWxmcy11cy0xLmh1Z2dpbmdmYWNlLmNvL3JlcG9zL2FmL2YwL2FmZjBkY2E3OGQ0NTQ1M2IzNDhiNTM5MDk3YmY1NzZiMjk0Y2UyZmIwZDUzNTQ1N2U3MTBhOGQ4ZGJlMzBhMjUvYjg1NzVjNGZjYWM5N2Y3NDZlZDA2ZDJiZGUxNGJmNjJkYWY5MWNmM2IzMzk5MmRmYmM4NDI0MDE3ZjJiZjE4ND9yZXNwb25zZS1jb250ZW50LWRpc3Bvc2l0aW9uPSomcmVzcG9uc2UtY29udGVudC10eXBlPSoifV19&Signature=Cq74lOcJRv-w1JieDOg1uYIHbekEe2MccwtxQyRFb08%7ENvQHAVqBAqmjAz2XxIajDmtklq-vh38U75%7ElT9Y5OzYRqJ4JwBv73vLMM8zbKELafPPOGWVfEcAh8KFMW5DKLNuqzxBMvInMKK4ylJ6wdT%7EXHBZijUGzrNC7j1R3pgdiG1uh-ndQ7%7EuL-Vw3AU213qC5YUq%7E8IzD8h0cErf-aQP96WtK03Z-50yZmtwLc6L-2FTO95GT5AUKf6BPbuNwkgMW0zzG4oYjE5raGRwrMWKIbTW2nWQK-2oHm9Ojv5TNAo%7Elc75p3AL0xIKC6yUGIxT8L82DUUWaYIF9IoJnwQ__&Key-Pair-Id=KCD77M1F0VK2B" alt="instruction BERT drawing" width="600"/>
A minimalistic instruction model with an already good analysed and pretrained encoder like BERT. So we can research the Bertology with instruction-tuned models, look at the attention and investigate what happens to BERT embeddings during fine-tuning.
The trainings code is released at the instructionBERT repository. We used the Huggingface API for warm-starting BertGeneration with Encoder-Decoder-Models for this purpose.
from transformers import AutoTokenizer, EncoderDecoderModel
# load the fine-tuned seq2seq model and corresponding tokenizer
model_name = "Bachstelze/instructionBERTtest"
model = EncoderDecoderModel.from_pretrained(model_name)
tokenizer = AutoTokenizer.from_pretrained(model_name)
input = "Write a poem about love, peace and pancake."
input_ids = tokenizer(input, return_tensors="pt").input_ids
output_ids = model.generate(input_ids, max_new_tokens=200)
print(tokenizer.decode(output_ids[0]))
InstructionBERT is intended for research purposes. The model-generated text should be treated as a starting point rather than a definitive solution for potential use cases. Users should be cautious when employing these models in their applications.