Downloads · 30 days
19
7% of all-time downloads
HacksHaven/sos-qwen3-4b-lora
sos-qwen3-4b-lora is a question answering model from HacksHaven. Use it when the input is a question plus a passage. It is set up for transformers. The card lists the license as mit.
This is a LoRA fine-tuned version of Qwen3:4B, adapted for educational and scientific question-answering. The model has been fine-tuned on the Science On a Sphere (SOS) QA Dataset, which includes thousands of prompt/c…
Downloads · 30 days
19
7% of all-time downloads
All-time downloads
257
Public
Parameters
4B
26 GB on disk
Likes
4
Public
Click a slice to open those files.
.safetensors8 GB · 100%
From the Hugging Face model README
This is a LoRA fine-tuned version of Qwen3:4B, adapted for educational and scientific question-answering. The model has been fine-tuned on the Science On a Sphere (SOS) QA Dataset, which includes thousands of prompt/completion pairs derived from NOAA’s Science On a Sphere support content and dataset catalog. The model is designed to support Earth science education and enable AI-powered SOS content experiences.
Base Model: Qwen/Qwen3-4B Fine-Tuned by: Eric Hackathorn (NOAA) Architecture: Transformer decoder-only (Qwen) Finetuning Type: Parameter-efficient fine-tuning using LoRA Language(s): English License: MIT
Model Status: Work in Progress
This model is currently under active development. Please note:
The “More Information” URLs are provisional — they currently overemphasize support pages rather than high-level "What is..." resources.
The links will be refined in upcoming updates to better align with the model's purpose and intended audience.
Feedback is welcome to help improve this aspect and others.
This model is a LoRA fine-tuned version of Qwen/Qwen3-4B, optimized for question answering over content related to NOAA’s Science On a Sphere (SOS) initiative, including Earth science metadata, dataset descriptions, support documentation, and educational guidance. It is designed to be integrated into museum kiosks, classroom assistants, educational chatbots, and SOS Explorer environments to make complex environmental data more accessible and engaging.
Educational Chatbots
Use: Plug into an LLM-powered assistant (like ChatGPT or a custom app) in a science museum, classroom, or mobile app.
Example: Student: “What causes a tsunami?” Model: Tsunamis are typically caused by underwater earthquakes, often at subduction zones. More information: https://sos.noaa.gov/catalog/datasets/tsunami-locations-2000-bce-2014/
Interactive Museum Kiosks
Use: Replace static displays with conversational kiosks powered by your model.
Example: A touchscreen exhibit next to an SOS globe where users ask, “What does this animation show?” and the model responds with a summary of that dataset.
SOS Explorer Integration
Use: Embed QA inside SOS Explorer or a future AI-powered version to describe datasets, provide learning guidance, or guide exploratory interactions.
Example: When a user clicks on a dataset, a bot could summarize it, suggest classroom activities, or quiz the user.
Curriculum and Lesson Plan Support
Use: Teachers ask the model for summaries, concepts, or classroom activities based on a specific dataset.
Example: “Describe a classroom activity using the dataset about ocean acidification.”
Research Assistant for Outreach Teams
Use: Internal NOAA outreach and comms teams use the model to quickly surface descriptions, summaries, related content, or activity suggestions.
Voice-activated Assistants
Use: Deploy in AR/VR environments or installations with voice input, e.g., “Tell me about sea surface temperature datasets.”
This model is optimized for:
It can be further fine-tuned for:
This is a merged and quantization-ready version of Qwen3-4B fine-tuned on the Science On a Sphere (SOS) instruction dataset using LoRA + PEFT. You can load it using:
from transformers import AutoModelForCausalLM, AutoTokenizer, BitsAndBytesConfig
bnb_config = BitsAndBytesConfig(
load_in_4bit=True,
bnb_4bit_compute_dtype=torch.bfloat16,
bnb_4bit_use_double_quant=True,
bnb_4bit_quant_type="nf4"
)
model = AutoModelForCausalLM.from_pretrained(
"HacksHaven/sos-qwen3-4b-lora",
quantization_config=bnb_config,
device_map="auto",
trust_remote_code=True,
torch_dtype=torch.bfloat16,
)
tokenizer = AutoTokenizer.from_pretrained("HacksHaven/sos-qwen3-4b-lora", trust_remote_code=True)
Use the code below to chat with the model.
qa = pipeline("text-generation", model=model, tokenizer=tokenizer)
qa("What is NOAA's Science On a Sphere?")
Prompts and completions were embedded in a Qwen-style conversational format using <|im_start|> and <|im_end|> tokens.
<|im_start|>user
[Prompt text]
<|im_end|>
<|im_start|>assistant
[Completion text]
<|im_end|>
| Parameter | Value |
|---|---|
| Base model | Qwen/Qwen3-4B |
| Finetuning method | LoRA (Low-Rank Adaptation) |
LoRA Rank (r) | 8 |
| LoRA Alpha | 32 |
| LoRA Dropout | 0.05 |
| Target Modules | q_proj, k_proj, v_proj, o_proj, gate_proj, up_proj, down_proj |
| Gradient Checkpointing | Enabled |
| Max sequence length | 8192 |
| Precision | bfloat16 |
| Quantization | 4-bit NF4 via BitsAndBytes |
| Optimizer | paged_adamw_8bit |
| Learning Rate | 2e-4 |
| Epochs | 3 |
| Batch Size | 1 (with gradient accumulation = 4) |
| Logging & Eval Strategy | Every 10 steps |
| Evaluation Metric | bertscore_f1 (maximize) |
| Load Best Model at End | ✅ Yes |
Evaluated on a 10% held-out split of the training dataset (stratified).
This model was fine-tuned to support instructional content for NOAA's Science On a Sphere (SOS) exhibits, which span a diverse set of topics and audiences. Relevant factors that may affect model performance include:
Scientific Domain: The model has seen examples across atmospheric science, oceanography, climate change, space weather, and Earth system interactions. Responses may vary depending on the domain depth in the fine-tuning set.
Instruction Type: Prompts vary in style, including explanations of scientific processes, definitions, causal reasoning, and narrative-style descriptions for public displays.
Intended Audience: While many prompts are written at a general public or middle school level, the model may perform differently for early learners, specialists, or multilingual audiences.
Input Format: The model is trained with structured instruction format tags (e.g., <|im_start|>user). Results may vary if these are not used consistently.
Data Origin: The training set draws from curated NOAA science narratives, educational materials, and exhibit scripts. Domains or tones not represented in these sources may yield less accurate responses.
Future evaluations could assess performance across these axes to better understand model reliability in SOS-like deployment environments.
Evaluation was performed using ROUGE, BLEU, BERTScore, and perplexity on a held-out 10% test set. BERTScore F1 was used to select the best checkpoint during training. Unfortunately it made my GPU burst into flames.
Quantitative results TBD in future update.
Summary will be added when quantitative evaluation is complete.
BibTeX:
@model{hackathorn_2025_sosqwen,
title = {Science On a Sphere QA Model (Qwen3-4B, LoRA)},
author = {Hackathorn, Eric},
year = {2025},
url = {https://huggingface.co/HacksHaven/sos-qwen3-4b-lora}
}
APA:
Hackathorn, E. (2025). Science On a Sphere QA Model (Qwen3-4B, LoRA). Hugging Face. https://huggingface.co/HacksHaven/sos-qwen3-4b-lora
Author: Eric Hackathorn Email: [email protected] Affiliation: NOAA Global Systems Laboratory