Views
No views yet
| Benchmark | Score |
|---|---|
| GSM8K (5-shot) | 29.72% |
| Component | Value |
|---|---|
| Parameters | ~1.07B |
| Hidden Size | 2048 |
| Layers | 16 |
| Attention Heads | 32 (8 KV heads - GQA) |
| Context Length | 131,072 tokens |
| Vocabulary | 128,262 tokens |
| Precision | bfloat16 |
1from transformers import AutoModelForCausalLM, AutoTokenizer
2import torch
3
4model_id = "theaicompany02/Shivik-1B"
5
6tokenizer = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True)
7model = AutoModelForCausalLM.from_pretrained(
8 model_id,
9 torch_dtype=torch.bfloat16,
10 device_map="auto",
11 trust_remote_code=True
12)
13
14# Math problem
15prompt = """Question: A store sells apples for $2 each. If John buys 5 apples and pays with a $20 bill, how much change does he get?
16
17Answer: Let me solve this step by step.
18"""
19
20inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
21outputs = model.generate(
22 **inputs,
23 max_new_tokens=256,
24 temperature=0.7,
25 do_sample=True,
26 pad_token_id=tokenizer.eos_token_id
27)
28print(tokenizer.decode(outputs[0], skip_special_tokens=True))