Downloads · 30 days
0
srivathsanb14/hw2-distilbert-lighting
hw2-distilbert-lighting is a machine learning model from srivathsanb14. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
'''--- language: en license: mit libraryname: autogluon pipelinetag: text-classification basemodel: distilbert-base-uncased tags: - autogluon - distilbert - education - 24-679 datasets: - {DATASETID} ---
Downloads · 30 days
0
Access
Public
Updated Sep 21, 2026
Repo size
266 MB
Likes
0
Public
Click a slice to open those files.
.ckpt265 MB · 100%
From the Hugging Face model README
'''--- language: en license: mit library_name: autogluon pipeline_tag: text-classification base_model: distilbert-base-uncased tags:
Same AutoMM DistilBERT recipe as discussed in class, applied to a classmate lighting dataset. (https://huggingface.co/datasets/jackstev/hw1-text-lighting-natural-artificial)
Classify a short room description as natural or artificial lighting.
| id | label |
|---|---|
| 0 | natural |
| 1 | artificial |
Source: {DATASET_ID} (jackstev). Published splits used as-is: train {len(df_train)} / val {len(df_val)} / test {len(df_test)}. Holdouts are unaugmented; no parent of a holdout text appears in train.
| Setting | Value |
|---|---|
| Encoder | distilbert-base-uncased, CLS pooling |
| Adaptation | {FINETUNE_MODE} + trainable classification head |
| Trainable parameters | {trainable_parameters:,} / {total_parameters:,} ({trainable_percent:.3f}%) |
| LR | 2e-5, layerwise decay |
| Epochs | 5; best val accuracy checkpoint |
| Batch | 8 |
| Max length | 128 subword tokens |
| Seed | {SEED} |
| Extra text aug | off (text_trivial_aug_maxscale=0) |
| Split | Accuracy | Weighted F1 |
|---|---|---|
| test | {accuracy:.4f} | {f1:.4f} |
See the notebook for the confusion matrix and written error analysis.
Do not use for occupancy or energy billing.
MIT for this repo. Dataset CC BY 4.0 (jackstev). DistilBERT Apache-2.0.
Google Colab GPU, 5 epochs, seed {SEED}. Python {platform.python_version()}.
from pathlib import Path
import pandas as pd
from huggingface_hub import snapshot_download
from autogluon.multimodal import MultiModalPredictor
snapshot = Path(snapshot_download("{HF_MODEL_ID}", allow_patterns=["automm/*"]))
model = MultiModalPredictor.load(str(snapshot / "automm"))
model.set_num_gpus(0)
model.predict(pd.DataFrame({{"text": ["Sunlight slides across the oak floor."]}}))
I chose the classmate dataset and wrote the miss hypotheses. Cursor aligned this notebook with the class DistilBERT AutoMM notebook. '''