Update README.md
Browse files
README.md
CHANGED
@@ -69,8 +69,10 @@ device = 'cuda' if torch.cuda.is_available() else 'cpu'
|
|
69 |
|
70 |
transformers.models.gptj.modeling_gptj.GPTJBlock = GPTJBlock # monkey-patch GPT-J
|
71 |
|
72 |
-
|
73 |
-
|
|
|
|
|
74 |
|
75 |
|
76 |
prompt = tokenizer("El sentido de la vida es", return_tensors='pt')
|
|
|
69 |
|
70 |
transformers.models.gptj.modeling_gptj.GPTJBlock = GPTJBlock # monkey-patch GPT-J
|
71 |
|
72 |
+
ckpt = "mrm8488/bertin-gpt-j-6B-ES-v1-8bit"
|
73 |
+
|
74 |
+
tokenizer = transformers.AutoTokenizer.from_pretrained(ckpt)
|
75 |
+
model = GPTJForCausalLM.from_pretrained(ckpt, pad_token_id=tokenizer.eos_token_id, low_cpu_mem_usage=True).to(device)
|
76 |
|
77 |
|
78 |
prompt = tokenizer("El sentido de la vida es", return_tensors='pt')
|