Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/QwenLM/Qwen3Guard
/ functions
Functions
15 in github.com/QwenLM/Qwen3Guard
⨍
Functions
15
◇
Types & classes
2
↓ 2 callers
Method
calculate_metrics
Calculates precision, recall, and F1 for the 'Unsafe' category.
eval/eval_stream.py:148
↓ 1 callers
Method
_find_last_user_content_index
(self, tokens_list)
eval/eval_stream.py:120
↓ 1 callers
Method
_get_model_prompt_predictions
(self, model_inputs, split_idx, input_ids)
eval/eval_stream.py:90
↓ 1 callers
Method
_get_model_response_predictions
(self, model_inputs, split_idx, input_ids)
eval/eval_stream.py:59
↓ 1 callers
Method
consecutive_unsafe
(self, pred_list: List[str])
eval/eval_stream.py:139
↓ 1 callers
Method
evaluate_f1
(self, file_path: str, data_type: str)
eval/eval_stream.py:162
↓ 1 callers
Method
evaluate_unsafe_latency
(self, file_path: str)
eval/eval_stream.py:193
↓ 1 callers
Function
load_input_data
Load input data from either a local JSONL file or a Hugging Face dataset, and filter to keep only items where type == "thinking+response".
eval/eval_gen.py:9
↓ 1 callers
Function
main
()
eval/eval_stream.py:257
↓ 1 callers
Function
main
(model_path, input_file, output_file)
eval/eval_gen.py:32
↓ 1 callers
Method
process_conversation_prompt
(self, messages)
eval/eval_stream.py:48
↓ 1 callers
Method
process_conversation_response
(self, messages, thinking=False)
eval/eval_stream.py:30
Method
__init__
(self, model_path: str)
eval/eval_stream.py:15
Method
__init__
(self, classification_strategy="consecutive_unsafe")
eval/eval_stream.py:132
Method
process_bins
(numbers)
eval/eval_stream.py:194