--- base_model: r-karra/Gemma-2-9B-JEE-Socratic-Final tags: - text-generation-inference - transformers - unsloth - gemma2 license: apache-2.0 language: - en library_name: transformers --- # Uploaded finetuned model - **Developed by:** r-karra - **License:** apache-2.0 - **Finetuned from model :** r-karra/Gemma-2-9B-JEE-Socratic-Final This gemma2 model was trained 2x faster with [Unsloth](https://github.com/unslothai/unsloth) and Huggingface's TRL library. [](https://github.com/unslothai/unsloth) # JEE Advanced Socratic Tutor Project > An AI-powered Socratic tutor for IIT-JEE Advanced aspirants, designed to encourage conceptual understanding through guided questioning rather than direct solutions. --- ## ๐ŸŽฏ Objective This project focuses on building an AI-driven educational assistant specifically for students preparing for the **IIT-JEE Advanced** examination. Unlike conventional AI tutors that directly provide answers, this model follows the **Socratic Method**, encouraging students to think critically by asking carefully designed questions that guide them toward the solution. The goal is to promote: - ๐Ÿง  Deep conceptual understanding - ๐Ÿ“ˆ Self-paced learning - ๐ŸŽ“ Strong problem-solving skills - ๐Ÿ” Reasoning instead of memorization --- # ๐Ÿ“š Pedagogical Approach The tutor acts as a **learning facilitator**, not merely an answer generator. For every student question, the model: 1. Analyzes the student's query. 2. Identifies the underlying JEE Advanced concept. 3. Breaks the concept into smaller reasoning steps. 4. Asks guiding questions instead of revealing the answer. 5. Encourages students to derive the final result independently. ### Example Topics - Thermodynamics - Rotational Dynamics - Electrostatics - Organic Chemistry - Coordinate Geometry - Calculus - Mechanics - Chemical Equilibrium - Physical Chemistry - Modern Physics --- # ๐Ÿ› ๏ธ Project Structure ``` . โ”œโ”€โ”€ Dataset โ”‚ โ”œโ”€โ”€ JEE Advanced Papers โ”‚ โ”œโ”€โ”€ Chemistry Syllabus โ”‚ โ”œโ”€โ”€ Physics Notes โ”‚ โ””โ”€โ”€ Mathematics Problems โ”‚ โ”œโ”€โ”€ Data Processing โ”‚ โ”œโ”€โ”€ Cleaning โ”‚ โ”œโ”€โ”€ Formatting โ”‚ โ””โ”€โ”€ Socratic Prompt Creation โ”‚ โ”œโ”€โ”€ Fine-Tuning โ”‚ โ”œโ”€โ”€ Unsloth โ”‚ โ”œโ”€โ”€ Hugging Face Transformers โ”‚ โ””โ”€โ”€ Gemma-2-9B โ”‚ โ”œโ”€โ”€ Model โ”‚ โ””โ”€โ”€ Gemma-2-9B-JEE-Socratic-Final โ”‚ โ””โ”€โ”€ Inference โ””โ”€โ”€ Hugging Face Transformers ``` --- # ๐Ÿ“‚ Dataset The dataset consists of carefully curated **IIT-JEE Advanced** educational resources. ## Question Papers - JEE Advanced 2013 - JEE Advanced 2015 - JEE Advanced 2017 - JEE Advanced 2018 - JEE Advanced 2019 - JEE Advanced 2022 Subjects include: - Physics - Chemistry - Mathematics --- ## Support Material Additional curated educational resources include: - Rotational Motion - Gaseous State - Liquid State - Official Chemistry Syllabus (2026) These resources help improve conceptual understanding and expand the tutoring capability beyond previous examination questions. --- # ๐Ÿš€ Fine-Tuning Pipeline ## 1. Environment Setup The project uses **Unsloth** for efficient GPU-based fine-tuning. Supported environments: - Kaggle - Google Colab Benefits: - Faster training - Lower GPU memory usage - Easy Hugging Face integration --- ## 2. Dataset Preparation The original JEE Advanced questions are transformed into conversational teaching examples. Each example teaches the model to: - Understand the student's intent - Avoid giving direct answers - Generate Socratic prompts - Encourage reasoning --- ## 3. Instruction Tuning The Gemma model is instruction-tuned to recognize pedagogical patterns. Instead of: > "Here is the answer." The model responds like: > "Which thermodynamic quantity determines spontaneity?" > "What happens to ฮ”G when entropy increases?" This encourages active learning. --- ## 4. Deployment After fine-tuning, the model is published on Hugging Face. **Model Repository** ``` r-karra/Gemma-2-9B-JEE-Socratic-Final ``` --- # ๐Ÿ’ป Inference Guide You **do not** need to convert the model to GGUF format. The model can be loaded directly using the Hugging Face `transformers` library. ## Installation ```bash pip install transformers accelerate torch ``` --- ## Python Example ```python from transformers import AutoModelForCausalLM, AutoTokenizer import torch from google.colab import userdata # Configuration model_id = "r-karra/Gemma-2-9B-JEE-Socratic-Final" token = userdata.get("HF_TOKEN") device = "cuda" if torch.cuda.is_available() else "cpu" # Load tokenizer print("Loading tokenizer...") tokenizer = AutoTokenizer.from_pretrained( "google/gemma-2-9b-it", token=token ) # Load model print("Loading model...") model = AutoModelForCausalLM.from_pretrained( model_id, token=token, device_map="auto", torch_dtype=torch.float16 ).to(device) def ask_tutor(question): prompt = ( "System: You are an expert IIT-JEE Advanced tutor " "using the Socratic method.\n" f"User: {question}\n" "Model:" ) inputs = tokenizer(prompt, return_tensors="pt").to(device) with torch.no_grad(): outputs = model.generate( **inputs, max_new_tokens=500 ) response = tokenizer.decode( outputs[0][inputs["input_ids"].shape[1]:], skip_special_tokens=True ) return response print( ask_tutor( "How can I determine if a reaction is spontaneous using Gibbs free energy?" ) ) ``` --- # ๐Ÿงช Example Interaction ### Student > How can I determine whether a reaction is spontaneous using Gibbs free energy? ### Tutor > Before thinking about spontaneity, can you recall the mathematical expression relating Gibbs free energy to enthalpy and entropy? > What does a negative value of ฮ”G imply about the direction of a process? > How would increasing temperature affect the entropy contribution? --- # ๐ŸŽ“ Educational Philosophy Rather than replacing teachers, this project aims to become an intelligent learning companion that: - Encourages curiosity - Promotes conceptual reasoning - Builds confidence - Helps students think like problem solvers The emphasis is on **learning the process**, not memorizing the answer. --- # ๐Ÿงฐ Technology Stack - Python - PyTorch - Hugging Face Transformers - Hugging Face Hub - Unsloth - Google Colab - Kaggle - Gemma-2-9B --- # ๐Ÿ“ฆ Model **Model Name** ``` Gemma-2-9B-JEE-Socratic-Final ``` **Hugging Face Repository** ``` r-karra/Gemma-2-9B-JEE-Socratic-Final ``` --- # ๐Ÿ“„ License All IIT-JEE Advanced question papers remain the intellectual property of their respective examination authorities. This repository is intended solely for: - Educational purposes - Research - AI-assisted learning No copyright over the original examination content is claimed. --- # ๐Ÿ™ Acknowledgements Special thanks to: - Google DeepMind - Hugging Face - Unsloth - Kaggle - Google Colab - The Full-Stack GenAI Bootcamp for providing the tools and ecosystem that made this project possible. --- # โญ Citation If you find this project useful, please consider starring the repository and citing it in your educational or research work. ``` @misc{jee-socratic-tutor, author = {Rajesh Kumar Karra}, title = {Gemma-2-9B JEE Advanced Socratic Tutor}, year = {2026}, publisher = {Hugging Face}, model = {r-karra/Gemma-2-9B-JEE-Socratic-Final} } ```