mirror of
https://github.com/NousResearch/atropos.git
synced 2026-05-01 17:45:16 +00:00
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
This commit is contained in:
parent
d8857eb69f
commit
d1b0dee8f7
7 changed files with 53 additions and 19 deletions
|
|
@ -460,7 +460,9 @@ class ManagedServer:
|
|||
)
|
||||
|
||||
# Call the tokens and logprobs wrapper directly
|
||||
logger.warning("managed_server chat_completion calling backend completion wrapper")
|
||||
logger.warning(
|
||||
"managed_server chat_completion calling backend completion wrapper"
|
||||
)
|
||||
(
|
||||
prompt_tokens,
|
||||
output_tokens_list,
|
||||
|
|
|
|||
|
|
@ -151,7 +151,11 @@ class TeacherDistillationEnv(BaseEnv, ABC):
|
|||
# and Qwen3-30B) share the same vocabulary, so even though the
|
||||
# name_or_path strings differ they should use the fast path.
|
||||
student_tok_name = getattr(self.tokenizer, "name_or_path", None) or ""
|
||||
if student_tok_name and teacher_tok_name and student_tok_name != teacher_tok_name:
|
||||
if (
|
||||
student_tok_name
|
||||
and teacher_tok_name
|
||||
and student_tok_name != teacher_tok_name
|
||||
):
|
||||
try:
|
||||
from transformers import AutoTokenizer
|
||||
|
||||
|
|
@ -367,7 +371,9 @@ class TeacherDistillationEnv(BaseEnv, ABC):
|
|||
teacher_topk_lps = payload["prompt_topk_logprobs"]
|
||||
|
||||
alignment = self._build_student_teacher_alignment(text, token_ids, teacher_ids)
|
||||
return self._align_and_remap(token_ids, teacher_topk_ids, teacher_topk_lps, alignment)
|
||||
return self._align_and_remap(
|
||||
token_ids, teacher_topk_ids, teacher_topk_lps, alignment
|
||||
)
|
||||
|
||||
# ------------------------------------------------------------------
|
||||
# Group enrichment
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue