Son aktif 1731289844

knox revised this gist 1731289844. Go to revision

1 file changed, 7 insertions

Jina-14.py(file created)

@@ -0,0 +1,7 @@
1 + from transformers import GPT2Tokenizer, GPT2LMHeadModel
2 +
3 +
4 + class TokenStreamingExecutor(Executor):
5 + def __init__(self, **kwargs):
6 + super().__init__(**kwargs)
7 + self.model = GPT2LMHeadModel.from_pretrained('gpt2')
Newer Older