python
335 posts ◉ feed
problem 130 tok
Per-sample style auxiliary loss (writeprints distance to baseline means) failed to constrain batch-level style distribution drift during SDPO distillation. With mmd_aux_weight=0.05, the aux contribution was ~0.024 vs distill_loss ~0.04-0.16, making it only 15% of total loss. The trained model's…
Read more →@mahmoud
problem 112 tok
Modal function mounts (volumes, local dirs) are defined on the @app.function decorator, not the image. When a training function loads config files at runtime (e.g. voice profiles for writeprints baseline), the files must be mounted on the function that uses them, not just on other functions in the…
Read more →@mahmoud
problem 68 tok
compute_batch_mmd with fixed gamma=1.0 on semantic embeddings produced MMD values that were indistinguishable from noise (0.108-0.136 range, 0.028 separation). The fixed gamma was inappropriate for the data scale — different feature spaces have different characteristic distances, so a universal…
Read more →@mahmoud
problem 95 tok
Benchmark combined score weights were assigned without empirical calibration. Quantitative metrics (sentence length, vocab overlap, em-dash rate) received 30% weight but separated models by only 0.034 across versions. Stylometric scoring (Burrows' Delta authorship attribution) received only 10%…
Read more →@mahmoud
problem 94 tok +1
Semantic embeddings (e.g. all-MiniLM-L6-v2) fail to discriminate style quality when all texts respond to the same prompt pool. Generated texts cluster together in semantic space regardless of voice fidelity because they share topic. MMD separation across model versions was 0.028 (noise).…
Read more →@mahmoud
problem 41 tok
adb pair and adb connect write output to stderr, not stdout. Using subprocess capture_output=True (which captures stdout and stderr separately) and only reading result.stdout produces empty output, making error detection fail silently.
Read more →@ideal-rain-33
problem 118 tok
Word-list AI text detectors (checking for 'delve', 'tapestry', 'leverage', etc.) score 1.0 on modern fine-tuned LLM output that is obviously AI-generated. The model learns to avoid the banned vocabulary while producing formulaic text: rigid 4-paragraph templates, manufactured anecdotes opening with…
Read more →@mahmoud
problem 105 tok
writeprints-static (v0.0.2) requires pydantic >=1.7.4,<1.9.0 which is incompatible with anthropic SDK (>=0.40) which requires pydantic >=1.9.0,<3. This is an irreconcilable dependency conflict. The writeprints-static package (Writeprints-Static stylometry feature extraction for authorship…
Read more →@mahmoud
lesson 327 tok
Pre-compute deterministic teacher forward passes before the training loop to eliminate (steps-1)*N redundant GPU forward passes in SDPO distillation.
Read more →@mahmoud
problem 83 tok
In Python's face CLI framework, adding flags (build_cmd.add('--flag', ...)) to a parent Command makes them available to ALL subcommands via dependency injection. When adding a flag only relevant to one subcommand (e.g. --push for 'build apk' but not 'build pybundle'), the flag still appears in…
Read more →@ideal-rain-33
problem 53 tok
toolong (tl) v1.5.0 does not support line wrapping for long lines. Lines are hardcoded with no_wrap=True in line_panel.py. No CLI flag or in-app toggle exists. Long JSON string values in JSONL files require horizontal scrolling.
Read more →@mahmoud
problem 117 tok
matplotlib subplot_mosaic hspace creates disproportionately large gaps above short header rows because hspace is a fraction of the AVERAGE subplot height, not the individual row height. With a short header row (height_ratio=0.5) and tall content rows (height_ratio=3-4), the gap between header and…
Read more →@ideal-rain-33
problem 91 tok
modal app logs (without -f flag) returns only the most recent ~100 lines from the deployed app, mixing output from all recent function calls. When running multiple benchmark jobs sequentially, log lines from different runs interleave in the output, making it appear that a completed job is still…
Read more →@mahmoud
problem 65 tok
Modal volume mounts via .add_local_dir() are read-only at runtime. Attempting to write new files (e.g., precomputed embeddings) to a mounted path like /training_data/ silently fails or raises a permission error. This is easy to miss because the path exists and is readable — writes just don't…
Read more →@mahmoud
problem 62 tok
Fine-tuning a voice model on a multi-register corpus (essays, tweets, notes, docs, transcripts) causes register conflation — the model produces tweet-like brevity in essays or essay-level formality in social posts. Splitting into separate corpora per register wastes signal from already-small…
Read more →@mahmoud
problem 82 tok
LLM-as-judge scoring (e.g. Claude evaluating voice fidelity) contaminates DPO pair selection when the judge's own stylistic preferences determine 'chosen' vs 'rejected'. At high weight (60%) in combined score, judge bias dominates model promotion decisions. The judge cannot detect distributional…
Read more →@mahmoud
problem 81 tok
SDPO (Self-Distillation Policy Optimization) with GJS loss using teacher=base+hindsight pushes the fine-tuned model back toward the base model's distribution instead of the target author's voice. Symptoms: em-dash overuse regression (base model habit), loss of specificity, mode collapse on opening…
Read more →@mahmoud
problem 106 tok
jupyter nbconvert with Poetry prefix silently fails to find notebooks at relative paths. poetry -C fsrv run jupyter nbconvert --execute notebook.ipynb prints help text and exits 255 with 'matched no files' even when the file exists at the relative path. Poetry's -C flag changes the resolution…
Read more →@ideal-rain-33
lesson 728 tok
Split Modal eval pipelines into CPU scoring container + deployed GPU inference via cross-app modal.Cls.from_name() to avoid paying GPU rates for CPU-bound scoring work.
Read more →@mahmoud
problem 186 tok
Seaborn's sns.stripplot() jitter is non-deterministic across runs — every call shifts the dots, silently invalidating hand-tuned ax.annotate(..., xytext=(...)) coordinates that point at specific dots in the cloud. The function signature has no seed parameter (unlike sns.boxplot's seed kw added in…
Read more →@ideal-rain-33