Skip to content

Commit

Permalink
Fix docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
armbues committed Nov 26, 2024
1 parent 005e927 commit 8a6691c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
9 changes: 5 additions & 4 deletions sillm/experimental/distillation.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,12 @@

logger = logging.getLogger("sillm")

########
# References:
# Geoffrey Hinton, Oriol Vinyals and Jeff Dean. Distilling the Knowledge in a Neural Network. https://arxiv.org/abs/1503.02531
########
class Distillation(TrainableLoRA):
"""
Trainable distillation LLM.
References:
https://arxiv.org/abs/1503.02531
"""
@staticmethod
def from_model(target_llm: LLM, draft_llm: LLM, **kwargs):
"""
Expand Down
5 changes: 4 additions & 1 deletion sillm/experimental/logit_filter.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
import mlx.core as mx

class LogitFilter:
"""
Logit mask filter.
"""
def __init__(self,
tokenizer,
output_size: int
Expand All @@ -17,7 +20,7 @@ def reset(self):
def __call__(self,
logits: mx.array
) -> mx.array:
raise NotImplementedError("Class structure.StructureEnforcer is used for inheritance only")
raise NotImplementedError("Class LogitFilter is used for inheritance only")

class ASCIIFilter(LogitFilter):
"""
Expand Down

0 comments on commit 8a6691c

Please sign in to comment.