mirror of
https://github.com/p-e-w/heretic.git
synced 2026-12-03 18:42:57 +07:00
[GH-ISSUE #133] Implement token-level safety scoring #76
Labels
No labels
bug
enhancement
enhancement
pull-request
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
p-e-w/heretic#76
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @swamy18 on GitHub (Feb 7, 2026).
Original GitHub issue: https://github.com/p-e-w/heretic/issues/133
class TokenSafetyScorer:
def score_tokens(self, tokens, model_type='safety'):
# Score each token for safety
scores = []
for token in tokens:
score = self._get_token_risk(token)
scores.append(score)
return scores
@p-e-w commented on GitHub (Feb 8, 2026):
Covered by #53.