EvSys

SDFT

Attributes

attributenamestr
= 'sdft'
attributeConfigtype
= SDFTConfig

Functions

func_check_inputs(self, ctx) -> None
paramself
paramctxRunContext

Returns

None
funcsetup(self, ctx, backend) -> None
paramself
paramctxRunContext
parambackendTinkerBackend

Returns

None
funcbuild_batch(self, step_idx) -> TrainingBatch
paramself
paramstep_idxint

Returns

evsys_sdk.training.loop.TrainingBatch
funcstep_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.

paramself
paramstep_idxint
parambatchTrainingBatch
paramfb_resultAny

Returns

dict[str, float]
func_hyperparams_extra(self) -> dict[str, Any]
paramself

Returns

dict[str, typing.Any]
func_student_user_content(self, question) -> str

The user turn the student sees (no demo). The harbor agent's TinkerLLM renders it into a chat-templated prompt internally.

paramself
paramquestionstr

Returns

str

On this page