Downloads · 30 days
10
36% of all-time downloads
RichardErkhov/trl-internal-testing_-_dummy-GPT2-correct-vocab-8bits
trl-internal-testing_-_dummy-GPT2-correct-vocab-8bits is a machine learning model from RichardErkhov. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
Downloads · 30 days
10
36% of all-time downloads
All-time downloads
28
Public
Parameters
1.7M
3.3 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors3.3 MB · 49%
How the weights are stored.
F161.6M · 98%
From the Hugging Face model README
Quantization made by Richard Erkhov.
dummy-GPT2-correct-vocab - bnb 8bits
from transformers import AutoTokenizer, GPT2Config, GPT2LMHeadModel
config = GPT2Config(n_positions=512, n_embd=32, n_layer=5, n_head=4, n_inner=37, pad_token_id=1023, is_decoder=True)
model = GPT2LMHeadModel(config)
tokenizer = AutoTokenizer.from_pretrained("openai-community/gpt2")
model_id = "trl-internal-testing/dummy-GPT2-correct-vocab"
model.push_to_hub(model_id)
tokenizer.chat_template = "{% for message in messages %}{% if message['role'] == 'user' %}{{ ' ' }}{% endif %}{{ message['content'] }}{% if not loop.last %}{{ ' ' }}{% endif %}{% endfor %}{{ eos_token }}"
tokenizer.push_to_hub(model_id)
config.push_to_hub(model_id)