Phi-2 · LoRA · 4-bit Fine-tuning

SpaceBot Educational LLM

An educational language-model experiment that filters space questions from SciQ and fine-tunes Microsoft Phi-2 with LoRA and 4-bit quantization for astronomy-focused Q&A.

Interactive conversation

Explore the SpaceBot demo

Preset demo
SpaceBot is ready
You: How many planets are in the solar system?
SpaceBot: 8

Choose a prompt to preview example SpaceBot responses.

Project details

Building a domain-focused educational chatbot

01

Curate the data

The AllenAI SciQ science-question dataset is filtered using astronomy terms such as planet, gravity and black hole to create a smaller space-focused training set.

02

Fine-tune efficiently

Microsoft Phi-2 is adapted with LoRA and 4-bit quantization, reducing the amount of trainable parameters and memory required for the experiment.

03

Package and reload

The notebook includes the training workflow, model checkpoint handling and instructions for reloading the adapted model after fine-tuning.

04

Interactive Q&A

The final stage launches a simple conversational loop where users can ask astronomy questions and receive domain-focused responses from the fine-tuned model.

SpaceBot terminal conversation from GitHubView SpaceBot output ↗
Future improvements

Ideas already identified in the project

Add formal evaluation metricsExpand into other science domainsCreate a public web interfaceAdd voice-to-text interaction