File tree Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -617,10 +617,15 @@ def __init__(
617617 blocksparse_params : Optional [Dict [str , Any ]] = None ,
618618 logits_soft_cap : Optional [float ] = None ,
619619 attn_type : str = AttentionType .DECODER ,
620+ use_irope : bool = False ,
620621 ) -> None :
621622 if blocksparse_params is not None :
622623 raise ValueError (
623624 "FlashAttention does not support block-sparse attention." )
625+ if use_irope :
626+ logger .warning (
627+ "Using irope in V0 is not supported yet, it will fall back "
628+ "to global attention for long context." )
624629 self .num_heads = num_heads
625630 self .head_size = head_size
626631 self .scale = float (scale )
Original file line number Diff line number Diff line change 1919# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2020# See the License for the specific language governing permissions and
2121# limitations under the License.
22- from typing import Iterable , Set , Tuple
22+ from typing import Iterable , Set , Tuple , Type
2323
2424import torch
2525
2626from vllm .config import VllmConfig
2727from vllm .model_executor .model_loader .weight_utils import default_weight_loader
2828from vllm .model_executor .models .llama import LlamaForCausalLM , LlamaModel
2929
30+ from .llama import LlamaDecoderLayer
3031from .utils import (AutoWeightsLoader , PPMissingLayer , WeightsMapper ,
3132 is_pp_missing_parameter )
3233
@@ -120,7 +121,10 @@ class TeleChat2ForCausalLM(LlamaForCausalLM):
120121 },
121122 )
122123
123- def _init_model (self , vllm_config : VllmConfig , prefix : str = "" ):
124+ def _init_model (self ,
125+ vllm_config : VllmConfig ,
126+ prefix : str = "" ,
127+ layer_type : Type [LlamaDecoderLayer ] = LlamaDecoderLayer ):
124128 return TeleChat2Model (vllm_config = vllm_config , prefix = prefix )
125129
126130 def load_weights (self , weights : Iterable [Tuple [str ,
You can’t perform that action at this time.
0 commit comments