This is a base language model, not an instruction-tuned chat assistant.
MiniBananaMind-v3-9M uses a new digit-aware 8k tokenizer.
Digits are kept as separate tokens so numbers do not collapse into large number tokens during tokenization.
118 -> [9, 16]
2227 -> [10, 10, 15]
The training mix used both general educational web text and math-heavy text.
Formal benchmark results for this checkpoint are not included yet.
1import torch
2from transformers import AutoTokenizer, AutoModelForCausalLM
3
4model_id = "BananaMind/MiniBananaMind-v3-9M"
5
6tokenizer = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True)
7
8model = AutoModelForCausalLM.from_pretrained(
9 model_id,
10 trust_remote_code=True,
11 torch_dtype=torch.bfloat16 if torch.cuda.is_available() and torch.cuda.is_bf16_supported() else torch.float16,
12).cuda().eval()
13
14prompt = "The color of the sky is "
15input_ids = tokenizer(prompt, return_tensors="pt").input_ids.to(model.device)
16
17with torch.no_grad():
18 output = model.generate(
19 input_ids=input_ids,
20 max_new_tokens=64,
21 do_sample=False,
22 repetition_penalty=1.1,
23 pad_token_id=tokenizer.eos_token_id,
24 eos_token_id=tokenizer.eos_token_id,
25 )
26
27print(tokenizer.decode(output[0], skip_special_tokens=True))