haznitrama's picture
Rehost from suchirsalhan/babybabellm-mono-deu
bfc11a9 verified
|
Raw
History Blame Contribute Delete
984 Bytes
# haznitrama/babybabellm-gpt_bert-deu-causal
Rehosted from `suchirsalhan/babybabellm-mono-deu` with standardized remote code and auto_map.
- Original `model_type` preserved.
- Default AutoModel mapping points to GPTBertForCausalLM.
- Added both causal & masked LM wrappers for evaluation.
Example:
```python
from transformers import AutoTokenizer, AutoModel
m='haznitrama/babybabellm-gpt_bert-deu-causal'
tok=AutoTokenizer.from_pretrained(m, trust_remote_code=True)
model=AutoModel.from_pretrained(m, trust_remote_code=True)
print(model(**tok('Hello world', return_tensors='pt')).logits.shape)
```
Generation:
```python
from transformers import AutoModelForCausalLM, AutoTokenizer
m='haznitrama/babybabellm-gpt_bert-deu-causal'
tok=AutoTokenizer.from_pretrained(m, trust_remote_code=True)
model=AutoModelForCausalLM.from_pretrained(m, trust_remote_code=True)
print(tok.decode(model.generate(**tok('Hello', return_tensors='pt'), max_new_tokens=20)[0], skip_special_tokens=True))
```