Auto-Config via YAML
Declare your entire experiment — model arch, optimiser, scheduler, paths — in one YAML. Fenn parses, validates, and injects it. No argparse sprawl.
Fenn wires up config, logging, monitoring, and notifications — without hiding PyTorch from you. You write real PyTorch code. Fenn handles the rest.
Get early-access updates
Declare your entire experiment — model arch, optimiser, scheduler, paths — in one YAML. Fenn parses, validates, and injects it. No argparse sprawl.
Structured log output — loss, metrics, hyperparams — wired up automatically. Every run gets a consistent, searchable trail without extra setup.
Connect your experiment tracking dashboard with a single config flag. Fenn handles initialisation, step logging, and teardown automatically.
Get notified the moment your run finishes, fails, or hits a new best metric. Know what's happening even when you're away from the terminal.
Classification, regression, segmentation — Fenn ships battle-tested trainer loops so you can focus on architecture and data, not training boilerplate.
Start any new project from a versioned, opinionated template. Seeds, environments, and artifact paths are locked in from the first commit.
$ pip install fenn fenn[transformers] datasets
# fenn.yaml
project: lora-seq-cls
general:
device: cuda
model:
name: distilbert-base-uncased
num_labels: 2
max_length: 128
train:
seed: 42
epochs: 3
lr: 2e-4
batch: 16
lora:
r: 8
alpha: 16
dropout: 0.1
from fenn import Fenn
from fenn.nn.trainers import LoRATrainer
import torch.optim as optim
from torch.utils.data import DataLoader
from transformers import AutoModelForSequenceClassification, AutoTokenizer
from datasets import load_dataset
from sklearn.metrics import accuracy_score
app = Fenn()
@app.entrypoint
def main(args):
raw = load_dataset("sst2")
tokenizer = AutoTokenizer.from_pretrained(args["model"]["name"])
# ... build SentimentDataset and DataLoaders ...
model = AutoModelForSequenceClassification.from_pretrained(
args["model"]["name"], num_labels=args["model"]["num_labels"]
)
optimizer = optim.AdamW(
model.parameters(), lr=float(args["train"]["lr"])
)
trainer = LoRATrainer(
model=model, optim=optimizer, task_type="SEQ_CLS",
r=args["lora"]["r"], lora_alpha=args["lora"]["alpha"],
lora_dropout=float(args["lora"]["dropout"]),
target_modules=["q_lin", "v_lin"],
device=args["general"]["device"],
)
trainer.fit(train_loader, epochs=args["train"]["epochs"])
predictions = trainer.predict(test_loader)
print(f"Accuracy: {accuracy_score(test_labels, predictions):.4f}")
if __name__ == "__main__":
app.run()
$ python main.py
Fenn's template system bundles config, data loading, and the trainer into a single command. No scaffolding, no copy-pasting — just a complete, working pipeline from the first line.
$ fenn pull lora-cls
Support the project and get recognized on our site. Sponsors can be featured publicly, get access to exclusive content, receive privileged support, and help Fenn grow faster.
Your sponsorship can be showcased on our page so people can see you backing the project.
Unlock exclusive content and early updates designed to keep sponsors closer to the project.
Supporters can receive privileged help when they need guidance, troubleshooting, or direct feedback.