Views
No views yet
unsloth/llama-3-8b-instruct, specialized for generating and solving complex logic puzzles in a strict JSON format.Unsloth/Llama-3.3-70B-Instruct).unsloth/llama-3-8b-instructSeating Arrangements and Blood Relations.unsloth library for optimal performance on AMD GPUs (ROCm).1import torch
2from unsloth import FastLanguageModel
3
4# Load the fine-tuned model
5model_name = "Thunderbird2410/Llama-3-8B-Puzzles-Unsloth"
6
7model, tokenizer = FastLanguageModel.from_pretrained(
8 model_name = model_name,
9 max_seq_length = 4096,
10 dtype = torch.bfloat16,
11 device_map = "auto", # Automatically uses ROCm on AMD GPUs
12)
13
14tokenizer.padding_side = "left"
15if tokenizer.pad_token is None:
16 tokenizer.add_special_tokens({"pad_token": tokenizer.eos_token})
17 model.resize_token_embeddings(len(tokenizer))
18
19prompt = """
20Generate a hard MCQ-based question as well as its 4 choices and answer on the topic "Number Series".
21Return your response as a valid JSON object with this exact structure:
22{
23 "topic": "Number Series",
24 "question": "Your question here?",
25 "choices": [
26 "A) First option",
27 "B) Second option",
28 "C) Third option",
29 "D) Fourth option"
30 ],
31 "answer": "A",
32 "explanation": "Brief explanation for why the correct answer is right."
33}
34"""
35
36inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
37
38outputs = model.generate(
39 **inputs,
40 max_new_tokens = 512,
41 temperature = 0.1,
42 top_p = 0.9,
43 do_sample = True,
44)
45
46response = tokenizer.batch_decode(outputs, skip_special_tokens=True)[0]
47print(response)r): 161e-41@misc{thunderbird2410_llama3_puzzles_amd_2025,
2 author = {Thunderbird2410},
3 title = {Synthetic Data AI Agent System for the AMD × PyTorch × Unsloth Hackathon},
4 year = {2025},
5 publisher = {Hugging Face},
6 howpublished = {\url{https://huggingface.co/Thunderbird2410/Llama-3-8B-Puzzles-Unsloth}},
7}
8