SDFT
Attributes
attributenamestr= 'sdft'attributeConfigtype= SDFTConfigFunctions
func_check_inputs(self, ctx) -> NoneparamselfparamctxRunContextReturns
Nonefuncsetup(self, ctx, backend) -> NoneparamselfparamctxRunContextparambackendTinkerBackendReturns
Nonefuncbuild_batch(self, step_idx) -> TrainingBatchparamselfparamstep_idxintReturns
evsys_sdk.training.loop.TrainingBatchfuncstep_metrics(self, step_idx, batch, fb_result) -> dict[str, float]train/mean_loss = mean negative-logprob of the teacher's
preferred tokens under the student's distribution.
The loop already merges batch.metrics (teacher entropy / truncated
count); here we add the loss derived from the forward-backward output.
Per-position student logprobs are 0 on non-loss positions, negative on
the rest; ignore the zeros.
paramselfparamstep_idxintparambatchTrainingBatchparamfb_resultAnyReturns
dict[str, float]func_hyperparams_extra(self) -> dict[str, Any]paramselfReturns
dict[str, typing.Any]func_student_user_content(self, question) -> strThe user turn the student sees (no demo). The harbor agent's TinkerLLM renders it into a chat-templated prompt internally.
paramselfparamquestionstrReturns
str