File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
examples/models/llama/source_transformation Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 99# Example script for exporting Llama2 to flatbuffer
1010
1111import math
12- from typing import Tuple , Union , Optional
12+ from typing import Optional , Tuple , Union
1313
1414import torch
1515
@@ -24,7 +24,7 @@ def __init__(
2424 self ,
2525 kv_cache : Optional [Union [KVCache , QuantizedKVCache ]] = None ,
2626 dim : int = - 1 ,
27- is_causal = True ,
27+ is_causal = True ,
2828 ):
2929 super ().__init__ ()
3030 # Custom op only supports float32 currently. Converting to/from float32 is
@@ -48,8 +48,8 @@ def forward(
4848 k : torch .Tensor ,
4949 v : torch .Tensor ,
5050 bsz ,
51- seqlen = None ,
52- mask = None ,
51+ seqlen = None ,
52+ mask = None ,
5353 ):
5454 # Custom op only supports float32 currently. Converting to/from float32 is
5555 # faster than not having the op.
You can’t perform that action at this time.
0 commit comments