<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Python on SciDraft | A Hugo Theme</title><link>https://www.zhumengyao.com/scidraft/tags/python/</link><description>Recent content in Python on SciDraft | A Hugo Theme</description><generator>Hugo</generator><language>en</language><lastBuildDate>Tue, 22 Sep 2026 07:10:00 +0900</lastBuildDate><atom:link href="https://www.zhumengyao.com/scidraft/tags/python/index.xml" rel="self" type="application/rss+xml"/><item><title>Causal Multi-Head Attention in Python (intermediate)</title><link>https://www.zhumengyao.com/scidraft/notes/demo-note-causal-attention-python/</link><pubDate>Tue, 22 Sep 2026 07:10:00 +0900</pubDate><guid>https://www.zhumengyao.com/scidraft/notes/demo-note-causal-attention-python/</guid><description>&lt;p&gt;&lt;strong&gt;Demo note.&lt;/strong&gt; This note demonstrates what the &lt;strong&gt;SciDraft&lt;/strong&gt; Hugo theme can do
for academic and scientific publishing — for research institutions, researchers
and students. Its content is demonstration material only: readers should ignore
whether the demo content is correct.&lt;/p&gt;
&lt;p&gt;Attention is the one place in a transformer where tokens exchange information:
every other block — the projections, the activations, the normalisations —
treats positions independently. That makes attention mostly shape bookkeeping,
and the shapes alone decide which products are legal.&lt;/p&gt;</description></item><item><title>Layout of a Scaling Study (advanced folder structure)</title><link>https://www.zhumengyao.com/scidraft/notes/demo-note-folder-structure-advanced/</link><pubDate>Tue, 22 Sep 2026 07:01:00 +0900</pubDate><guid>https://www.zhumengyao.com/scidraft/notes/demo-note-folder-structure-advanced/</guid><description>&lt;p&gt;&lt;strong&gt;Demo note.&lt;/strong&gt; This note demonstrates what the &lt;strong&gt;SciDraft&lt;/strong&gt; Hugo theme can do
for academic and scientific publishing — for research institutions, researchers
and students. Its content is demonstration material only: readers should ignore
whether the demo content is correct.&lt;/p&gt;
&lt;p&gt;A project that produces a paper has to keep three kinds of thing apart that are
easy to mix: the installed source, the outputs of individual runs, and the
material the paper is written from. Once several sweeps and a performance
benchmark live in the same repository, the folder structure is what decides
whether a figure can be traced back to the run that produced it.&lt;/p&gt;</description></item><item><title>Layout of a Small Numeric Experiment (starter folder structure)</title><link>https://www.zhumengyao.com/scidraft/notes/demo-note-folder-structure-starter/</link><pubDate>Mon, 21 Sep 2026 15:52:00 +0900</pubDate><guid>https://www.zhumengyao.com/scidraft/notes/demo-note-folder-structure-starter/</guid><description>&lt;p&gt;&lt;strong&gt;Demo note.&lt;/strong&gt; This note demonstrates what the &lt;strong&gt;SciDraft&lt;/strong&gt; Hugo theme can do
for academic and scientific publishing — for research institutions, researchers
and students. Its content is demonstration material only: readers should ignore
whether the demo content is correct.&lt;/p&gt;
&lt;p&gt;The smallest useful project around a piece of neural-network mathematics holds
one idea per file and keeps the generated numbers out of the code. Nothing in it
is conventional yet: a starter folder is decided by what you want to compare
next, not by what a template says.&lt;/p&gt;</description></item><item><title>Softmax Cross-Entropy and Its Gradient in Python (advanced)</title><link>https://www.zhumengyao.com/scidraft/notes/demo-note-cross-entropy-gradient-python/</link><pubDate>Mon, 21 Sep 2026 12:52:00 +0900</pubDate><guid>https://www.zhumengyao.com/scidraft/notes/demo-note-cross-entropy-gradient-python/</guid><description>&lt;p&gt;&lt;strong&gt;Demo note.&lt;/strong&gt; This note demonstrates what the &lt;strong&gt;SciDraft&lt;/strong&gt; Hugo theme can do
for academic and scientific publishing — for research institutions, researchers
and students. Its content is demonstration material only: readers should ignore
whether the demo content is correct.&lt;/p&gt;
&lt;p&gt;The number a language model reports while training is the mean negative
log-likelihood of the token that actually came next: softmax cross-entropy over
the vocabulary at every position. Its backward pass has an unusually clean
closed form — the softmax Jacobian and the logarithm cancel, leaving the
probabilities minus the one-hot target, divided by the number of predictions.&lt;/p&gt;</description></item><item><title>Layout of a Trainable Model (intermediate folder structure)</title><link>https://www.zhumengyao.com/scidraft/notes/demo-note-folder-structure-intermediate/</link><pubDate>Mon, 21 Sep 2026 10:02:00 +0900</pubDate><guid>https://www.zhumengyao.com/scidraft/notes/demo-note-folder-structure-intermediate/</guid><description>&lt;p&gt;&lt;strong&gt;Demo note.&lt;/strong&gt; This note demonstrates what the &lt;strong&gt;SciDraft&lt;/strong&gt; Hugo theme can do
for academic and scientific publishing — for research institutions, researchers
and students. Its content is demonstration material only: readers should ignore
whether the demo content is correct.&lt;/p&gt;
&lt;p&gt;Once a model trains, the folder structure has a second job: it has to separate
what changes per run from what changes per idea. Configurations and checkpoints
belong to a run; attention code, data preparation and the training loop belong
to the project, and the split is what lets a result be reproduced from a config
file plus a commit rather than from memory.&lt;/p&gt;</description></item><item><title>Numerically Stable Softmax in Python (starter)</title><link>https://www.zhumengyao.com/scidraft/notes/demo-note-softmax-python/</link><pubDate>Mon, 21 Sep 2026 07:42:00 +0900</pubDate><guid>https://www.zhumengyao.com/scidraft/notes/demo-note-softmax-python/</guid><description>&lt;p&gt;&lt;strong&gt;Demo note.&lt;/strong&gt; This note demonstrates what the &lt;strong&gt;SciDraft&lt;/strong&gt; Hugo theme can do
for academic and scientific publishing — for research institutions, researchers
and students. Its content is demonstration material only: readers should ignore
whether the demo content is correct.&lt;/p&gt;
&lt;p&gt;A language model ends in a softmax: the raw scores of the last layer become a
probability distribution over the vocabulary, and everything downstream — the
training loss, sampling, beam search — reads that distribution rather than the
scores themselves.&lt;/p&gt;</description></item></channel></rss>