pub fn calculate_choice_energy_with_config(
question: &Question,
logits: &[f64],
calib_config: &CalibrationConfig,
gating_config: Option<&GatingConfig>,
) -> Option<f64>Expand description
Choice 型の質問とロジット配列、およびリクエスト固有のゲーティング設定から、正規化ヘルムホルツ自由エネルギーを算出する。
§温度解決の優先順位
gating_config.energy_temperature: リクエストで明示されたエネルギー温度。calib_config.gating_thresholds.energy_temperature: モデル成果物で事前較正されたエネルギー専用温度。calib_config.get_temperature(QuestionType::Choice, K): 候補数バケットに基づく Softmax 較正温度。
§引数
question: 質問定義。logits: 決定ロジットスライス。calib_config: キャリブレーション設定。gating_config: リクエスト固有のゲーティング設定 (任意)。
§戻り値
正規化ヘルムホルツ自由エネルギー値 (任意)。