Validation loss via LossEvaluator logs 0 (head skips loss computation in eval mode)
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 30/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 静か
- 技術スタック
- python
調査の方向性
Start in fast_llm/layers/language_model/head.py, in _logits_loss_forward_backward, where the if not self.training: branch (around lines 203-206) returns None for the loss. Then trace how the LossEvaluator runs the model in eval mode and reads lm_head_loss. The maintainer has not chosen between computing the loss in eval mode or changing the evaluator's forward pass, so settle that design question first. Done means evaluations.<name>.lm_head_loss logs a real non-zero value during validation.
索引モデルが issue の本文から書いたものです。
説明
Claude Opus 4.8 note (filed via Claude Code on the maintainer's behalf):
When training with a type: loss evaluator, the validation lm_head_loss is logged as exactly 0 at every eval step, while training.lm_head_loss is correct. Observed across 8 independent training runs, in both the console logs and W&B (evaluations.<name>.lm_head_loss = 0).
Likely cause
In LanguageModelHead._logits_loss_forward_backward (fast_llm/layers/language_model/head.py:203-206 on current main), the eval-mode branch computes logits only and returns None for the loss — it never runs the cross-entropy or appends to losses:
if not self.training:
logits, _ = self._logits_loss_forward_backward_partial(input_, kwargs, return_logits=True)
self._debug(logits, "logits", (kwargs[LanguageModelKwargs.hidden_token_dim], self._vocab_dim), kwargs)
return None, None
The LossEvaluator runs the model in eval mode, so the head produces no loss and the aggregated eval metric is 0.
Open question
I haven't pinned the intended fix — either the evaluator should run the forward with loss computation enabled, or the head should compute the loss in eval mode when targets are present. Either way, validation loss appears to be unusable through this path right now.
Repro
Any fast-llm train run configured with a loss evaluator; inspect evaluations.<name>.lm_head_loss (logs as 0).
- 主要言語
- Python
- スター
- 337
- フォーク
- 52
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
ServiceNow/Fast-LLM のほかの issue
-
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
ServiceNow/Fast-LLM#556 ·
-
enhancement
難易度 5/5 1週間以上 初心者へのやさしさ 12/100
ServiceNow/Fast-LLM#533 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 15/100
ServiceNow/Fast-LLM#510 · コメント 1 件 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 12/100
ServiceNow/Fast-LLM#507 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
ServiceNow/Fast-LLM#500 ·
ServiceNow/Fast-LLM の issue をすべて見る
似ている issue
-
PAC Wording
難易度 1/5 1時間未満 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
Harmony OPeNDAP SubSetter (HOSS) Geographic production rssmif16d 7 XYZ_PROV
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
nasa/harmony-autotester#372 ·
-
Add Domainオープン
難易度 1/5 1時間未満 初心者へのやさしさ 65/100
disposable/disposable#318 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
developmentseed/titiler-cmr#270 ·
メンテナーはふだん 1 日以内に返信
-
Chart: a failed venv install is marked ready, and the 10Gi venv PVC is too small for it対応中かも @andyne13 が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信