|
<?xml version="1.0"?> |
|
<net name="tokenizer" version="11"> |
|
<layers> |
|
<layer id="0" name="Parameter_127587" type="Parameter" version="opset1"> |
|
<data shape="?" element_type="string" /> |
|
<output> |
|
<port id="0" precision="STRING" names="Parameter_127587"> |
|
<dim>-1</dim> |
|
</port> |
|
</output> |
|
</layer> |
|
<layer id="1" name="Constant_127685" type="Const" version="opset1"> |
|
<data element_type="i32" shape="" offset="0" size="4" /> |
|
<output> |
|
<port id="0" precision="I32" /> |
|
</output> |
|
</layer> |
|
<layer id="2" name="Constant_127686" type="Const" version="opset1"> |
|
<data element_type="i32" shape="" offset="4" size="4" /> |
|
<output> |
|
<port id="0" precision="I32" /> |
|
</output> |
|
</layer> |
|
<layer id="3" name="Constant_127687" type="Const" version="opset1"> |
|
<data element_type="i32" shape="1" offset="8" size="4" /> |
|
<output> |
|
<port id="0" precision="I32"> |
|
<dim>1</dim> |
|
</port> |
|
</output> |
|
</layer> |
|
<layer id="4" name="Constant_127593" type="Const" version="opset1"> |
|
<data element_type="i64" shape="" offset="12" size="8" /> |
|
<output> |
|
<port id="0" precision="I64" /> |
|
</output> |
|
</layer> |
|
<layer id="5" name="StringTensorUnpack_127588" type="StringTensorUnpack" version="extension"> |
|
<data mode="begins_ends" /> |
|
<input> |
|
<port id="0" precision="STRING"> |
|
<dim>-1</dim> |
|
</port> |
|
</input> |
|
<output> |
|
<port id="1" precision="I32"> |
|
<dim>-1</dim> |
|
</port> |
|
<port id="2" precision="I32"> |
|
<dim>-1</dim> |
|
</port> |
|
<port id="3" precision="U8"> |
|
<dim>-1</dim> |
|
</port> |
|
</output> |
|
</layer> |
|
<layer id="6" name="ShapeOf_127589" type="ShapeOf" version="opset3"> |
|
<data output_type="i64" /> |
|
<input> |
|
<port id="0" precision="I32"> |
|
<dim>-1</dim> |
|
</port> |
|
</input> |
|
<output> |
|
<port id="1" precision="I64"> |
|
<dim>1</dim> |
|
</port> |
|
</output> |
|
</layer> |
|
<layer id="7" name="Constant_127590" type="Const" version="opset1"> |
|
<data element_type="i64" shape="" offset="12" size="8" /> |
|
<output> |
|
<port id="0" precision="I64" /> |
|
</output> |
|
</layer> |
|
<layer id="8" name="Constant_127591" type="Const" version="opset1"> |
|
<data element_type="i64" shape="" offset="12" size="8" /> |
|
<output> |
|
<port id="0" precision="I64" /> |
|
</output> |
|
</layer> |
|
<layer id="9" name="Gather_127592" type="Gather" version="opset8"> |
|
<data batch_dims="0" /> |
|
<input> |
|
<port id="0" precision="I64"> |
|
<dim>1</dim> |
|
</port> |
|
<port id="1" precision="I64" /> |
|
<port id="2" precision="I64" /> |
|
</input> |
|
<output> |
|
<port id="3" precision="I64" /> |
|
</output> |
|
</layer> |
|
<layer id="10" name="Constant_127594" type="Const" version="opset1"> |
|
<data element_type="i64" shape="" offset="20" size="8" /> |
|
<output> |
|
<port id="0" precision="I64" /> |
|
</output> |
|
</layer> |
|
<layer id="11" name="Range_127595" type="Range" version="opset4"> |
|
<data output_type="i32" /> |
|
<input> |
|
<port id="0" precision="I64" /> |
|
<port id="1" precision="I64" /> |
|
<port id="2" precision="I64" /> |
|
</input> |
|
<output> |
|
<port id="3" precision="I32"> |
|
<dim>-1</dim> |
|
</port> |
|
</output> |
|
</layer> |
|
<layer id="12" name="Constant_127596" type="Const" version="opset1"> |
|
<data element_type="i64" shape="" offset="20" size="8" /> |
|
<output> |
|
<port id="0" precision="I64" /> |
|
</output> |
|
</layer> |
|
<layer id="13" name="Constant_127597" type="Const" version="opset1"> |
|
<data element_type="i64" shape="" offset="20" size="8" /> |
|
<output> |
|
<port id="0" precision="I64" /> |
|
</output> |
|
</layer> |
|
<layer id="14" name="Add_127598" type="Add" version="opset1"> |
|
<data auto_broadcast="numpy" /> |
|
<input> |
|
<port id="0" precision="I64" /> |
|
<port id="1" precision="I64" /> |
|
</input> |
|
<output> |
|
<port id="2" precision="I64" /> |
|
</output> |
|
</layer> |
|
<layer id="15" name="Constant_127599" type="Const" version="opset1"> |
|
<data element_type="i64" shape="" offset="20" size="8" /> |
|
<output> |
|
<port id="0" precision="I64" /> |
|
</output> |
|
</layer> |
|
<layer id="16" name="Range_127600" type="Range" version="opset4"> |
|
<data output_type="i32" /> |
|
<input> |
|
<port id="0" precision="I64" /> |
|
<port id="1" precision="I64" /> |
|
<port id="2" precision="I64" /> |
|
</input> |
|
<output> |
|
<port id="3" precision="I32"> |
|
<dim>-1</dim> |
|
</port> |
|
</output> |
|
</layer> |
|
<layer id="17" name="Constant_127662" type="Const" version="opset1"> |
|
<data element_type="u8" shape="9248" offset="28" size="9248" /> |
|
<output> |
|
<port id="0" precision="U8"> |
|
<dim>9248</dim> |
|
</port> |
|
</output> |
|
</layer> |
|
<layer id="18" name="SpecialTokensSplit_127663" type="SpecialTokensSplit" version="extension"> |
|
<input> |
|
<port id="0" precision="I32"> |
|
<dim>-1</dim> |
|
</port> |
|
<port id="1" precision="I32"> |
|
<dim>-1</dim> |
|
</port> |
|
<port id="2" precision="I32"> |
|
<dim>-1</dim> |
|
</port> |
|
<port id="3" precision="I32"> |
|
<dim>-1</dim> |
|
</port> |
|
<port id="4" precision="U8"> |
|
<dim>-1</dim> |
|
</port> |
|
<port id="5" precision="U8"> |
|
<dim>9248</dim> |
|
</port> |
|
</input> |
|
<output> |
|
<port id="6" precision="I32"> |
|
<dim>-1</dim> |
|
</port> |
|
<port id="7" precision="I32"> |
|
<dim>-1</dim> |
|
</port> |
|
<port id="8" precision="I32"> |
|
<dim>-1</dim> |
|
</port> |
|
<port id="9" precision="I32"> |
|
<dim>-1</dim> |
|
</port> |
|
<port id="10" precision="U8"> |
|
<dim>-1</dim> |
|
</port> |
|
<port id="11" precision="BOOL"> |
|
<dim>-1</dim> |
|
</port> |
|
</output> |
|
</layer> |
|
<layer id="19" name="Constant_127665" type="Const" version="opset1"> |
|
<data element_type="u8" shape="115" offset="9276" size="115" /> |
|
<output> |
|
<port id="0" precision="U8"> |
|
<dim>115</dim> |
|
</port> |
|
</output> |
|
</layer> |
|
<layer id="20" name="RegexSplit_127666" type="RegexSplit" version="extension"> |
|
<data behaviour="isolate" invert="false" max_splits="-1" /> |
|
<input> |
|
<port id="0" precision="I32"> |
|
<dim>-1</dim> |
|
</port> |
|
<port id="1" precision="I32"> |
|
<dim>-1</dim> |
|
</port> |
|
<port id="2" precision="I32"> |
|
<dim>-1</dim> |
|
</port> |
|
<port id="3" precision="I32"> |
|
<dim>-1</dim> |
|
</port> |
|
<port id="4" precision="U8"> |
|
<dim>-1</dim> |
|
</port> |
|
<port id="5" precision="BOOL"> |
|
<dim>-1</dim> |
|
</port> |
|
<port id="6" precision="U8"> |
|
<dim>115</dim> |
|
</port> |
|
</input> |
|
<output> |
|
<port id="7" precision="I32"> |
|
<dim>-1</dim> |
|
</port> |
|
<port id="8" precision="I32"> |
|
<dim>-1</dim> |
|
</port> |
|
<port id="9" precision="I32"> |
|
<dim>-1</dim> |
|
</port> |
|
<port id="10" precision="I32"> |
|
<dim>-1</dim> |
|
</port> |
|
<port id="11" precision="U8"> |
|
<dim>-1</dim> |
|
</port> |
|
<port id="12" precision="BOOL"> |
|
<dim>-1</dim> |
|
</port> |
|
</output> |
|
</layer> |
|
<layer id="21" name="Constant_127668" type="Const" version="opset1"> |
|
<data element_type="u8" shape="1351800" offset="9391" size="1351800" /> |
|
<output> |
|
<port id="0" precision="U8"> |
|
<dim>1351800</dim> |
|
</port> |
|
</output> |
|
</layer> |
|
<layer id="22" name="StringTensorUnpack_127669" type="StringTensorUnpack" version="extension"> |
|
<data mode="begins_ends" /> |
|
<input> |
|
<port id="0" precision="U8"> |
|
<dim>1351800</dim> |
|
</port> |
|
</input> |
|
<output> |
|
<port id="1" precision="I32"> |
|
<dim>-1</dim> |
|
</port> |
|
<port id="2" precision="I32"> |
|
<dim>-1</dim> |
|
</port> |
|
<port id="3" precision="U8"> |
|
<dim>-1</dim> |
|
</port> |
|
</output> |
|
</layer> |
|
<layer id="23" name="Constant_127674" type="Const" version="opset1"> |
|
<data element_type="u8" shape="2114111" offset="1361191" size="2114111" /> |
|
<output> |
|
<port id="0" precision="U8"> |
|
<dim>2114111</dim> |
|
</port> |
|
</output> |
|
</layer> |
|
<layer id="24" name="StringTensorUnpack_127675" type="StringTensorUnpack" version="extension"> |
|
<data mode="begins_ends" /> |
|
<input> |
|
<port id="0" precision="U8"> |
|
<dim>2114111</dim> |
|
</port> |
|
</input> |
|
<output> |
|
<port id="1" precision="I32"> |
|
<dim>-1</dim> |
|
</port> |
|
<port id="2" precision="I32"> |
|
<dim>-1</dim> |
|
</port> |
|
<port id="3" precision="U8"> |
|
<dim>-1</dim> |
|
</port> |
|
</output> |
|
</layer> |
|
<layer id="25" name="Constant_127677" type="Const" version="opset1"> |
|
<data element_type="u8" shape="2157314" offset="3475302" size="2157314" /> |
|
<output> |
|
<port id="0" precision="U8"> |
|
<dim>2157314</dim> |
|
</port> |
|
</output> |
|
</layer> |
|
<layer id="26" name="StringTensorUnpack_127678" type="StringTensorUnpack" version="extension"> |
|
<data mode="begins_ends" /> |
|
<input> |
|
<port id="0" precision="U8"> |
|
<dim>2157314</dim> |
|
</port> |
|
</input> |
|
<output> |
|
<port id="1" precision="I32"> |
|
<dim>-1</dim> |
|
</port> |
|
<port id="2" precision="I32"> |
|
<dim>-1</dim> |
|
</port> |
|
<port id="3" precision="U8"> |
|
<dim>-1</dim> |
|
</port> |
|
</output> |
|
</layer> |
|
<layer id="27" name="Constant_127671" type="Const" version="opset1"> |
|
<data element_type="u8" shape="8489" offset="5632616" size="8489" /> |
|
<output> |
|
<port id="0" precision="U8"> |
|
<dim>8489</dim> |
|
</port> |
|
</output> |
|
</layer> |
|
<layer id="28" name="StringTensorUnpack_127672" type="StringTensorUnpack" version="extension"> |
|
<data mode="begins_ends" /> |
|
<input> |
|
<port id="0" precision="U8"> |
|
<dim>8489</dim> |
|
</port> |
|
</input> |
|
<output> |
|
<port id="1" precision="I32"> |
|
<dim>-1</dim> |
|
</port> |
|
<port id="2" precision="I32"> |
|
<dim>-1</dim> |
|
</port> |
|
<port id="3" precision="U8"> |
|
<dim>-1</dim> |
|
</port> |
|
</output> |
|
</layer> |
|
<layer id="29" name="Constant_127679" type="Const" version="opset1"> |
|
<data element_type="i32" shape="256" offset="5641105" size="1024" /> |
|
<output> |
|
<port id="0" precision="I32"> |
|
<dim>256</dim> |
|
</port> |
|
</output> |
|
</layer> |
|
<layer id="30" name="BPETokenizer_127680" type="BPETokenizer" version="extension"> |
|
<data unk_token="" fuse_unk="false" suffix_indicator="" end_suffix="" byte_fallback="false" cache_capacity="25600" /> |
|
<input> |
|
<port id="0" precision="I32"> |
|
<dim>-1</dim> |
|
</port> |
|
<port id="1" precision="I32"> |
|
<dim>-1</dim> |
|
</port> |
|
<port id="2" precision="I32"> |
|
<dim>-1</dim> |
|
</port> |
|
<port id="3" precision="I32"> |
|
<dim>-1</dim> |
|
</port> |
|
<port id="4" precision="U8"> |
|
<dim>-1</dim> |
|
</port> |
|
<port id="5" precision="I32"> |
|
<dim>-1</dim> |
|
</port> |
|
<port id="6" precision="I32"> |
|
<dim>-1</dim> |
|
</port> |
|
<port id="7" precision="U8"> |
|
<dim>-1</dim> |
|
</port> |
|
<port id="8" precision="I32"> |
|
<dim>-1</dim> |
|
</port> |
|
<port id="9" precision="I32"> |
|
<dim>-1</dim> |
|
</port> |
|
<port id="10" precision="U8"> |
|
<dim>-1</dim> |
|
</port> |
|
<port id="11" precision="I32"> |
|
<dim>-1</dim> |
|
</port> |
|
<port id="12" precision="I32"> |
|
<dim>-1</dim> |
|
</port> |
|
<port id="13" precision="U8"> |
|
<dim>-1</dim> |
|
</port> |
|
<port id="14" precision="I32"> |
|
<dim>-1</dim> |
|
</port> |
|
<port id="15" precision="I32"> |
|
<dim>-1</dim> |
|
</port> |
|
<port id="16" precision="U8"> |
|
<dim>-1</dim> |
|
</port> |
|
<port id="17" precision="I32"> |
|
<dim>256</dim> |
|
</port> |
|
</input> |
|
<output> |
|
<port id="18" precision="I32"> |
|
<dim>-1</dim> |
|
</port> |
|
<port id="19" precision="I32"> |
|
<dim>-1</dim> |
|
</port> |
|
<port id="20" precision="I32"> |
|
<dim>-1</dim> |
|
</port> |
|
</output> |
|
</layer> |
|
<layer id="31" name="Subtract_127681" type="Subtract" version="opset1"> |
|
<data auto_broadcast="numpy" /> |
|
<input> |
|
<port id="0" precision="I32"> |
|
<dim>-1</dim> |
|
</port> |
|
<port id="1" precision="I32"> |
|
<dim>-1</dim> |
|
</port> |
|
</input> |
|
<output> |
|
<port id="2" precision="I32"> |
|
<dim>-1</dim> |
|
</port> |
|
</output> |
|
</layer> |
|
<layer id="32" name="Constant_127682" type="Const" version="opset1"> |
|
<data element_type="i32" shape="" offset="5642129" size="4" /> |
|
<output> |
|
<port id="0" precision="I32" /> |
|
</output> |
|
</layer> |
|
<layer id="33" name="Minimum_127683" type="Minimum" version="opset1"> |
|
<data auto_broadcast="numpy" /> |
|
<input> |
|
<port id="0" precision="I32"> |
|
<dim>-1</dim> |
|
</port> |
|
<port id="1" precision="I32" /> |
|
</input> |
|
<output> |
|
<port id="2" precision="I32"> |
|
<dim>-1</dim> |
|
</port> |
|
</output> |
|
</layer> |
|
<layer id="34" name="Add_127684" type="Add" version="opset1"> |
|
<data auto_broadcast="numpy" /> |
|
<input> |
|
<port id="0" precision="I32"> |
|
<dim>-1</dim> |
|
</port> |
|
<port id="1" precision="I32"> |
|
<dim>-1</dim> |
|
</port> |
|
</input> |
|
<output> |
|
<port id="2" precision="I32"> |
|
<dim>-1</dim> |
|
</port> |
|
</output> |
|
</layer> |
|
<layer id="35" name="Constant_127688" type="Const" version="opset1"> |
|
<data element_type="i32" shape="2" offset="12" size="8" /> |
|
<output> |
|
<port id="0" precision="I32"> |
|
<dim>2</dim> |
|
</port> |
|
</output> |
|
</layer> |
|
<layer id="36" name="CombineSegments_127689" type="CombineSegments" version="extension"> |
|
<input> |
|
<port id="0" precision="I32" /> |
|
<port id="1" precision="I32" /> |
|
<port id="2" precision="I32"> |
|
<dim>1</dim> |
|
</port> |
|
<port id="3" precision="I32"> |
|
<dim>-1</dim> |
|
</port> |
|
<port id="4" precision="I32"> |
|
<dim>-1</dim> |
|
</port> |
|
<port id="5" precision="I32"> |
|
<dim>-1</dim> |
|
</port> |
|
<port id="6" precision="I32"> |
|
<dim>2</dim> |
|
</port> |
|
</input> |
|
<output> |
|
<port id="7" precision="I32"> |
|
<dim>-1</dim> |
|
</port> |
|
<port id="8" precision="I32"> |
|
<dim>-1</dim> |
|
</port> |
|
<port id="9" precision="I32"> |
|
<dim>-1</dim> |
|
</port> |
|
<port id="10" precision="I32"> |
|
<dim>-1</dim> |
|
</port> |
|
<port id="11" precision="I32"> |
|
<dim>-1</dim> |
|
</port> |
|
<port id="12" precision="I32"> |
|
<dim>-1</dim> |
|
</port> |
|
</output> |
|
</layer> |
|
<layer id="37" name="Subtract_127690" type="Subtract" version="opset1"> |
|
<data auto_broadcast="numpy" /> |
|
<input> |
|
<port id="0" precision="I32"> |
|
<dim>-1</dim> |
|
</port> |
|
<port id="1" precision="I32"> |
|
<dim>-1</dim> |
|
</port> |
|
</input> |
|
<output> |
|
<port id="2" precision="I32"> |
|
<dim>-1</dim> |
|
</port> |
|
</output> |
|
</layer> |
|
<layer id="38" name="Constant_127691" type="Const" version="opset1"> |
|
<data element_type="i32" shape="" offset="0" size="4" /> |
|
<output> |
|
<port id="0" precision="I32" /> |
|
</output> |
|
</layer> |
|
<layer id="39" name="ReduceMax_127692" type="ReduceMax" version="opset1"> |
|
<data keep_dims="false" /> |
|
<input> |
|
<port id="0" precision="I32"> |
|
<dim>-1</dim> |
|
</port> |
|
<port id="1" precision="I32" /> |
|
</input> |
|
<output> |
|
<port id="2" precision="I32" /> |
|
</output> |
|
</layer> |
|
<layer id="40" name="Constant_127693" type="Const" version="opset1"> |
|
<data element_type="i32" shape="" offset="0" size="4" /> |
|
<output> |
|
<port id="0" precision="I32" /> |
|
</output> |
|
</layer> |
|
<layer id="41" name="RaggedToDense_127694" type="RaggedToDense" version="extension"> |
|
<data pad_right="true" /> |
|
<input> |
|
<port id="0" precision="I32"> |
|
<dim>-1</dim> |
|
</port> |
|
<port id="1" precision="I32"> |
|
<dim>-1</dim> |
|
</port> |
|
<port id="2" precision="I32"> |
|
<dim>-1</dim> |
|
</port> |
|
<port id="3" precision="I32" /> |
|
<port id="4" precision="I32" /> |
|
</input> |
|
<output> |
|
<port id="5" precision="I32"> |
|
<dim>-1</dim> |
|
<dim>-1</dim> |
|
</port> |
|
<port id="6" precision="BOOL"> |
|
<dim>-1</dim> |
|
<dim>-1</dim> |
|
</port> |
|
</output> |
|
</layer> |
|
<layer id="42" name="Convert_127695" type="Convert" version="opset1"> |
|
<data destination_type="i32" /> |
|
<input> |
|
<port id="0" precision="BOOL"> |
|
<dim>-1</dim> |
|
<dim>-1</dim> |
|
</port> |
|
</input> |
|
<output> |
|
<port id="1" precision="I32"> |
|
<dim>-1</dim> |
|
<dim>-1</dim> |
|
</port> |
|
</output> |
|
</layer> |
|
<layer id="43" name="Convert_127695" type="Convert" version="opset1"> |
|
<data destination_type="i64" /> |
|
<input> |
|
<port id="0" precision="I32"> |
|
<dim>-1</dim> |
|
<dim>-1</dim> |
|
</port> |
|
</input> |
|
<output> |
|
<port id="1" precision="I64" names="attention_mask"> |
|
<dim>-1</dim> |
|
<dim>-1</dim> |
|
</port> |
|
</output> |
|
</layer> |
|
<layer id="45" name="RaggedToDense_127694.0" type="Convert" version="opset1"> |
|
<data destination_type="i64" /> |
|
<input> |
|
<port id="0" precision="I32"> |
|
<dim>-1</dim> |
|
<dim>-1</dim> |
|
</port> |
|
</input> |
|
<output> |
|
<port id="1" precision="I64" names="input_ids"> |
|
<dim>-1</dim> |
|
<dim>-1</dim> |
|
</port> |
|
</output> |
|
</layer> |
|
<layer id="46" name="Result_127698" type="Result" version="opset1"> |
|
<input> |
|
<port id="0" precision="I64"> |
|
<dim>-1</dim> |
|
<dim>-1</dim> |
|
</port> |
|
</input> |
|
</layer> |
|
<layer id="44" name="Result_127700" type="Result" version="opset1"> |
|
<input> |
|
<port id="0" precision="I64"> |
|
<dim>-1</dim> |
|
<dim>-1</dim> |
|
</port> |
|
</input> |
|
</layer> |
|
</layers> |
|
<edges> |
|
<edge from-layer="0" from-port="0" to-layer="5" to-port="0" /> |
|
<edge from-layer="1" from-port="0" to-layer="36" to-port="0" /> |
|
<edge from-layer="2" from-port="0" to-layer="36" to-port="1" /> |
|
<edge from-layer="3" from-port="0" to-layer="36" to-port="2" /> |
|
<edge from-layer="4" from-port="0" to-layer="11" to-port="0" /> |
|
<edge from-layer="5" from-port="1" to-layer="6" to-port="0" /> |
|
<edge from-layer="5" from-port="3" to-layer="18" to-port="4" /> |
|
<edge from-layer="5" from-port="2" to-layer="18" to-port="3" /> |
|
<edge from-layer="5" from-port="1" to-layer="18" to-port="2" /> |
|
<edge from-layer="6" from-port="1" to-layer="9" to-port="0" /> |
|
<edge from-layer="7" from-port="0" to-layer="9" to-port="1" /> |
|
<edge from-layer="8" from-port="0" to-layer="9" to-port="2" /> |
|
<edge from-layer="9" from-port="3" to-layer="14" to-port="0" /> |
|
<edge from-layer="9" from-port="3" to-layer="11" to-port="1" /> |
|
<edge from-layer="10" from-port="0" to-layer="11" to-port="2" /> |
|
<edge from-layer="11" from-port="3" to-layer="18" to-port="0" /> |
|
<edge from-layer="12" from-port="0" to-layer="16" to-port="0" /> |
|
<edge from-layer="13" from-port="0" to-layer="14" to-port="1" /> |
|
<edge from-layer="14" from-port="2" to-layer="16" to-port="1" /> |
|
<edge from-layer="15" from-port="0" to-layer="16" to-port="2" /> |
|
<edge from-layer="16" from-port="3" to-layer="18" to-port="1" /> |
|
<edge from-layer="17" from-port="0" to-layer="18" to-port="5" /> |
|
<edge from-layer="18" from-port="9" to-layer="20" to-port="3" /> |
|
<edge from-layer="18" from-port="11" to-layer="20" to-port="5" /> |
|
<edge from-layer="18" from-port="10" to-layer="20" to-port="4" /> |
|
<edge from-layer="18" from-port="8" to-layer="20" to-port="2" /> |
|
<edge from-layer="18" from-port="7" to-layer="20" to-port="1" /> |
|
<edge from-layer="18" from-port="6" to-layer="20" to-port="0" /> |
|
<edge from-layer="19" from-port="0" to-layer="20" to-port="6" /> |
|
<edge from-layer="20" from-port="7" to-layer="30" to-port="0" /> |
|
<edge from-layer="20" from-port="8" to-layer="30" to-port="1" /> |
|
<edge from-layer="20" from-port="9" to-layer="30" to-port="2" /> |
|
<edge from-layer="20" from-port="10" to-layer="30" to-port="3" /> |
|
<edge from-layer="20" from-port="11" to-layer="30" to-port="4" /> |
|
<edge from-layer="21" from-port="0" to-layer="22" to-port="0" /> |
|
<edge from-layer="22" from-port="3" to-layer="30" to-port="7" /> |
|
<edge from-layer="22" from-port="1" to-layer="30" to-port="5" /> |
|
<edge from-layer="22" from-port="2" to-layer="30" to-port="6" /> |
|
<edge from-layer="23" from-port="0" to-layer="24" to-port="0" /> |
|
<edge from-layer="24" from-port="1" to-layer="30" to-port="8" /> |
|
<edge from-layer="24" from-port="2" to-layer="30" to-port="9" /> |
|
<edge from-layer="24" from-port="3" to-layer="30" to-port="10" /> |
|
<edge from-layer="25" from-port="0" to-layer="26" to-port="0" /> |
|
<edge from-layer="26" from-port="3" to-layer="30" to-port="13" /> |
|
<edge from-layer="26" from-port="1" to-layer="30" to-port="11" /> |
|
<edge from-layer="26" from-port="2" to-layer="30" to-port="12" /> |
|
<edge from-layer="27" from-port="0" to-layer="28" to-port="0" /> |
|
<edge from-layer="28" from-port="1" to-layer="30" to-port="14" /> |
|
<edge from-layer="28" from-port="2" to-layer="30" to-port="15" /> |
|
<edge from-layer="28" from-port="3" to-layer="30" to-port="16" /> |
|
<edge from-layer="29" from-port="0" to-layer="30" to-port="17" /> |
|
<edge from-layer="30" from-port="20" to-layer="36" to-port="5" /> |
|
<edge from-layer="30" from-port="18" to-layer="36" to-port="3" /> |
|
<edge from-layer="30" from-port="18" to-layer="34" to-port="0" /> |
|
<edge from-layer="30" from-port="18" to-layer="31" to-port="1" /> |
|
<edge from-layer="30" from-port="19" to-layer="31" to-port="0" /> |
|
<edge from-layer="31" from-port="2" to-layer="33" to-port="0" /> |
|
<edge from-layer="32" from-port="0" to-layer="33" to-port="1" /> |
|
<edge from-layer="33" from-port="2" to-layer="34" to-port="1" /> |
|
<edge from-layer="34" from-port="2" to-layer="36" to-port="4" /> |
|
<edge from-layer="35" from-port="0" to-layer="36" to-port="6" /> |
|
<edge from-layer="36" from-port="8" to-layer="37" to-port="0" /> |
|
<edge from-layer="36" from-port="7" to-layer="37" to-port="1" /> |
|
<edge from-layer="36" from-port="7" to-layer="41" to-port="0" /> |
|
<edge from-layer="36" from-port="8" to-layer="41" to-port="1" /> |
|
<edge from-layer="36" from-port="9" to-layer="41" to-port="2" /> |
|
<edge from-layer="37" from-port="2" to-layer="39" to-port="0" /> |
|
<edge from-layer="38" from-port="0" to-layer="39" to-port="1" /> |
|
<edge from-layer="39" from-port="2" to-layer="41" to-port="3" /> |
|
<edge from-layer="40" from-port="0" to-layer="41" to-port="4" /> |
|
<edge from-layer="41" from-port="6" to-layer="42" to-port="0" /> |
|
<edge from-layer="41" from-port="5" to-layer="45" to-port="0" /> |
|
<edge from-layer="42" from-port="1" to-layer="43" to-port="0" /> |
|
<edge from-layer="43" from-port="1" to-layer="44" to-port="0" /> |
|
<edge from-layer="45" from-port="1" to-layer="46" to-port="0" /> |
|
</edges> |
|
<rt_info> |
|
<add_attention_mask value="True" /> |
|
<add_prefix_space /> |
|
<add_special_tokens value="True" /> |
|
<bos_token_id value="128000" /> |
|
<chat_template value="{%- if messages|length % 2 == 0 -%} {%- set role = 'Agent' -%} {%- else -%} {%- set role = 'User' -%} {%- endif -%} {%- if categories is not defined -%} {%- set categories = ({ "S1": "Violent Crimes.", "S2": "Non-Violent Crimes.", "S3": "Sex Crimes.", "S4": "Child Exploitation.", "S5": "Defamation.", "S6": "Specialized Advice.", "S7": "Privacy.", "S8": "Intellectual Property.", "S9": "Indiscriminate Weapons.", "S10": "Hate.", "S11": "Self-Harm.", "S12": "Sexual Content.", "S13": "Elections.", }) -%} {%- endif -%} {{- "<|begin_of_text|><|start_header_id|>user<|end_header_id|>\n\n" -}} {%- set ns = namespace(contains_image=false) -%} {%- for message in messages -%} {%- for content in message['content'] | selectattr('type', 'equalto', 'image') -%} {%- set ns.contains_image = true -%} {%- endfor -%} {%- endfor -%} {%- if ns.contains_image -%} {{- "<|image|> "-}} {%- endif -%} {{- "Task: Check if there is unsafe content in '" + role + "' messages in conversations according our safety policy with the below categories.\n\n" -}} {{- "<BEGIN UNSAFE CONTENT CATEGORIES>\n"-}} {%- for key in categories -%} {%- if key not in excluded_category_keys -%} {{-key + ": " + categories[key] + "\n" -}} {%- endif -%} {%- endfor -%} {{- "<END UNSAFE CONTENT CATEGORIES>\n\n"-}} {{- "<BEGIN CONVERSATION>\n\n"-}} {%- for message in messages -%} {%- if (message['role'] == 'user') != (loop.index0 % 2 == 0) -%} {{ raise_exception('Conversation roles must alternate user/assistant/user/assistant/...')-}} {%- endif -%} {%- set content = message['content'] -%} {%- if message['role'] == 'user' -%} {%- set role = 'User' -%} {%- elif message['role'] == 'assistant' -%} {%- set role = 'Agent' -%} {%- endif -%} {%- for content in message['content'] | selectattr('type', 'equalto', 'text') -%} {{- role + ': ' + content['text'] | trim + '\n\n'-}} {%- endfor -%} {%- endfor -%} {{- "<END CONVERSATION>\n\n"-}} {{- "Provide your safety assessment for ONLY THE LAST " + role + " message in the above conversation:\n"-}} {{- " - First line must read 'safe' or 'unsafe'.\n"-}} {{- " - If unsafe, a second line must include a comma-separated list of violated categories. <|eot_id|><|start_header_id|>assistant<|end_header_id|>"-}} " /> |
|
<clean_up_tokenization_spaces /> |
|
<detokenizer_input_type value="i64" /> |
|
<eos_token_id value="128009" /> |
|
<handle_special_tokens_with_re /> |
|
<number_of_inputs value="1" /> |
|
<openvino_tokenizers_version value="2024.5.0.0" /> |
|
<openvino_version value="2024.5.0" /> |
|
<original_tokenizer_class value="<class 'transformers.tokenization_utils_fast.PreTrainedTokenizerFast'>" /> |
|
<sentencepiece_version value="0.2.0" /> |
|
<skip_special_tokens value="True" /> |
|
<streaming_detokenizer value="False" /> |
|
<tiktoken_version value="0.8.0" /> |
|
<tokenizer_output_type value="i64" /> |
|
<tokenizers_version value="0.20.1" /> |
|
<transformers_version value="4.46.3" /> |
|
<use_max_padding value="False" /> |
|
<use_sentencepiece_backend value="False" /> |
|
<utf8_replace_mode /> |
|
<with_detokenizer value="True" /> |
|
</rt_info> |
|
</net> |
|
|