Perform various data analysis on SEC 13-F and obtain some insights of fund activities such as number of holdings, AUM, and change of holdings between two quarters.
日本語の概要は準備中です。原文の説明を表示しています。
Diagnostic guide for RL-based post-training of language models (GRPO, PPO, REINFORCE, DPO). Use proactively when debugging a training pipeline that shows no improvement, loss anomalies, reward stagnation, NaN gradients, or other unexpected behavior during reinforcement learning fine-tuning. Work through all pipeline stages — reward, advantages, log-probs, loss, generation/decoding — before concluding the diagnosis is complete; stopping after one or two fixes is a common failure mode. Covers log-probability math, advantage estimation, numerical stability, reward processing, and generation/decoding pipeline issues.
インストールする前に、エージェントに与えられる指示の中身を確認できます。
RL post-training optimizes a language model's policy using reward signals. The standard pipeline:
prompt → generate completions → score with reward → compute advantages → policy gradient update
Each stage has distinct failure modes. When a model "shows no improvement," the bug could be anywhere in this pipeline.
When RL training produces no improvement, work through these stages in order. Each stage depends on the previous one being correct.
G. G ≤ 2 makes std either undefined or extremely noisy.F.log_softmax on a small deterministic input — a numerical match rules out sign errors, wrong gathering axis, and off-by-one subtraction.A bug in a branched function is a bug in one branch, not a verdict on the whole function. Before editing:
The same principle applies to epsilon values, sign conventions, and clipping bounds — if a constant looks wrong, replace it with a correct constant; don't remove the surrounding numerical-stability logic.
These invariants should always hold. If any is violated, there is a bug.
| Invariant | What it means | How to check |
|---|---|---|
log_prob <= 0 | Log of a probability is non-positive | assert (log_probs <= 1e-6).all() |
log-probs match F.log_softmax | Manual implementation equals the reference | torch.allclose(manual, F.log_softmax(...).gather(...)) |
sum(softmax(logits)) == 1 | Probabilities sum to 1 | assert torch.allclose(softmax.sum(-1), ones) |
0 < epsilon << 1 | Additive epsilons exist for numerical stability only | assert 0 < epsilon < 1 |
advantages != 0 when rewards vary | Non-constant rewards yield non-zero advantages | assert advantages.abs().max() > 0.1 |
| Decoding preserves content | Every generation shape the model emits survives the decode path with the content a human reader would expect | Round-trip representative samples; confirm non-empty where non-empty is expected |
Detailed pitfall catalog with examples is in references/common-pitfalls.md. Summary:
.item()/numpy round-trips in the loss pathG too small| File | Contents | When to load |
|---|---|---|
references/common-pitfalls.md | Catalog of pitfall categories with symptoms and detection strategies | When you have a suspicious area and want to match it against known pattern shapes |
references/diagnostic-workflow.md | Stage-by-stage diagnostic procedures with verification snippets | When you need guidance on which invariant to check in which order |
scripts/verify_pipeline.py | Runnable diagnostic that prints log-prob / advantage / decoding values on small fixed inputs so you can compare them against the invariants above | Before declaring a fix done: run this and inspect the output, paying attention to lines marked ? |
まだレビューはありません。使ってみた感想をお寄せください。
概要と使いどころ
Perform various data analysis on SEC 13-F and obtain some insights of fund activities such as number of holdings, AUM, and change of holdings between two quarters.
日本語の概要は準備中です。原文の説明を表示しています。
AC branch pi-model power flow equations (P/Q and |S|) with transformer tap ratio and phase shift, matching `acopf-math-model.md` and MATPOWER branch fields. Use when computing branch flows in either direction, aggregating bus injections for nodal balance, checking MVA (rateA) limits, computing branch loading %, or debugging sign/units issues in AC power flow.
日本語の概要は準備中です。原文の説明を表示しています。
Redact text from PDF documents for blind review anonymization
日本語の概要は準備中です。原文の説明を表示しています。
Use when checking simplified ADA-derived plan-view bathroom accessibility constraints such as turning space, door clear width, toilet centerline, grab bars, and lavatory knee/toe clearance.
日本語の概要は準備中です。原文の説明を表示しています。
Analyze failed GitHub Action jobs for a pull request.
日本語の概要は準備中です。原文の説明を表示しています。
Use when extracting plan-view architectural geometry from DXF files with semantic CAD layers, especially when outputs must normalize rooms, doors, fixtures, clearances, and grab bars into machine-checkable JSON.
日本語の概要は準備中です。原文の説明を表示しています。