LLaMA-3.2-1B-Instruct Fine-Tuned Model
Model Card for Hugging Face Repository
Model Summary
This is a fine-tuned version of the LLaMA-3.2-1B-Instruct model. Fine-tuned using the kanhatakeyama/wizardlm8x22b-logical-math-coding-sft dataset, this model is specialized in logical reasoning , mathematical problem-solving , and coding tasks . Training was performed using Unsloth on Google Colab, optimized for performance and usability.
Model Details
Model Name : LLaMA-3.2-1B-Instruct (Fine-tuned)
Base Model : LLaMA-3.2-1B-Instruct
Fine-Tuning Dataset : kanhatakeyama/wizardlm8x22b-logical-math-coding-sft
Fine-Tuning Framework : Unsloth
Parameters : 1 Billion
Domain : Logical Reasoning, Mathematics, Coding
Tags : llama, fine-tuning, instruction-following, math, coding, logical-reasoning, unsloth
Fine-Tuning Dataset
The fine-tuning dataset, kanhatakeyama/wizardlm8x22b-logical-math-coding-sft, is curated for advanced reasoning tasks. It contains:
Logical reasoning scenarios
Step-by-step mathematical solutions
Complex code generation and debugging examples
Intended Use
This model is ideal for tasks such as:
Logical Problem Solving : Derive conclusions and explanations for logical questions.
Mathematics : Solve algebra, calculus, and other mathematical problems.
Coding : Generate, debug, and explain programming code in various languages.
Instruction-Following : Handle user queries with clear and concise answers.
Example Applications:
AI tutors
Logical reasoning assistants
Math-solving bots
Code generation and debugging tools
Usage
Installation
To use this model, install the required dependencies:
pip install transformers datasets torch accelerate
Loading the Model
1 from transformers import AutoModelForCausalLM , AutoTokenizer
2
3 # Load the fine-tuned model and tokenizer
4 model_name = "ai-nexuz/llama-3.2-1b-instruct-fine-tuned"
5 tokenizer = AutoTokenizer . from_pretrained ( model_name )
6 model = AutoModelForCausalLM . from_pretrained ( model_name )
Generating Outputs
1 prompt = "Solve this equation: 2x + 3 = 7. Find x."
2
3 inputs = tokenizer ( prompt , return_tensors = "pt" )
4 outputs = model . generate ( ** inputs , max_length = 100 )
5 response = tokenizer . decode ( outputs [ 0 ] , skip_special_tokens = True )
6
7 print ( response )
Model Training
Hardware
Platform : Google Colab Pro
GPU : NVIDIA Tesla T4
Training Configuration
Frameworks Used
Unsloth : For efficient training
Hugging Face Transformers : For model and tokenizer handling
Limitations
While this model is highly proficient in logical reasoning, mathematics, and coding tasks, there are some limitations:
May produce inaccurate results for ambiguous or poorly-defined prompts.
Performance may degrade for highly specialized or niche coding languages.
Deployment
Using Gradio for Web UI
1 import gradio as gr
2
3 def generate_response ( prompt ) :
4 inputs = tokenizer ( prompt , return_tensors = "pt" )
5 outputs = model . generate ( ** inputs , max_length = 200 )
6 return tokenizer . decode ( outputs [ 0 ] , skip_special_tokens = True )
7
8 gr . Interface ( fn = generate_response , inputs = "text" , outputs = "text" ) . launch ( )
Hugging Face Inference API
This model can also be accessed using the Hugging Face Inference API for hosted deployment:
1 from transformers import pipeline
2
3 pipe = pipeline ( "text-generation" , model = "ai-nexuz/llama-3.2-1b-instruct-fine-tuned" )
4 result = pipe ( "Explain the concept of recursion in programming." )
5 print ( result )
Acknowledgements
This fine-tuning work was made possible by:
Hugging Face for their exceptional library and dataset hosting.
Unsloth for providing an efficient fine-tuning framework.
Google Colab for GPU resources.
Citation
If you use this model in your research or project, please cite it as:
@model{llama31b_instruct_finetuned,
title={Fine-Tuned LLaMA-3.2-1B-Instruct},
author={Your Name},
year={2024},
url={https://huggingface.co/your-huggingface-repo/llama-3.2-1b-instruct-finetuned},
}
Licensing
This model is released under the Apache 2.0 License . See LICENSE for details.
Tags :
llama fine-tuning math coding logical-reasoning instruction-following transformers
Summary :
A fine-tuned version of LLaMA-3.2-1B-Instruct specializing in logical reasoning, math problem-solving, and code generation. Perfect for AI-driven tutoring, programming assistance, and logical problem-solving tasks.