Views
No views yet
1{
2 "vocab_size": 50000,
3 "d_model": 2048,
4 "num_heads": 16,
5 "num_layers": 24,
6 "d_ff": 8192,
7 "max_seq_len": 512,
8 "dropout": 0.1,
9 "reasoning_enabled": true,
10 "max_reasoning_steps": 5,
11 "reasoning_temperature": 0.3,
12 "confidence_threshold": 0.7
13}1import torch
2from huggingface_hub import hf_hub_download
3import json
4
5# Download model and config
6model_path = hf_hub_download(
7 repo_id="JonusNattapong/zombit-thai-gpt-reasoning",
8 filename="best_model.pt"
9)
10
11config_path = hf_hub_download(
12 repo_id="JonusNattapong/zombit-thai-gpt-reasoning",
13 filename="config.json"
14)
15
16# Load config
17with open(config_path, 'r', encoding='utf-8') as f:
18 config = json.load(f)
19
20# Load model checkpoint
21checkpoint = torch.load(model_path, map_location='cpu')
22print(f"Model loaded with {len(checkpoint['model_state_dict'])} parameters")1# Example reasoning prompts
2questions = [
3 "ถ้าฉันมีแอปเปิ้ล 3 ลูก และเพื่อนให้อีก 5 ลูก จะมีทั้งหมดกี่ลูก?",
4 "น้ำเดือดที่อุณหภูมิเท่าไรที่ระดับน้ำทะเล?",
5 "1+1 เท่ากับเท่าไร?"
6]
7
8def create_reasoning_prompt(question: str) -> str:
9 return f"คำถาม: {question}\n\nการแก้ปัญหา:\n1. เข้าใจโจทย์\n2. แผนการแก้\n3. การคำนวณ\n4. ตรวจสอบคำตอบ\n\nคำตอบ:"
10
11for question in questions:
12 prompt = create_reasoning_prompt(question)
13 print(f"Question: {question}")
14 print(f"Prompt: {prompt[:100]}...")
15 # Add your inference code here