code: def _buffered_future_mask(tensor, maxpos, alibi, attn_heads):
      _future_mask = torch.triu(
          _fill_with_neg_inf(torch.zeros([maxpos, maxpos])), 1
      )
      _future_mask = _future_mask.unsqueeze(0) + alibi
      new_future_mask = _future_mask.to(tensor)
      return new_future_mask[
          : tensor.shape[0] * attn_heads, :maxpos, :maxpos
      ]
  
file_path: BigDL/python/llm/src/bigdl/llm/transformers/models/baichuan2.py
imports: import math
  from typing import Optional, Tuple
  import torch
  import torch.utils.checkpoint
  from torch.nn import functional
  from bigdl.llm.ggml.quantize import ggml_tensor_qtype
  from bigdl.llm.transformers.models.utils import init_kv_cache, extend_kv_cache, append_kv_cache
  from bigdl.llm.transformers.models.utils import apply_rotary_pos_emb
  from bigdl.llm.transformers.models.utils import apply_rotary_pos_emb_no_cache_xpu
  from bigdl.llm.transformers.models.utils import mlp_fusion_check
  from transformers.utils import logging
label_desc: Use image node_id 7 for calling a global function with example usage: _buffered_future_mask(tensor, maxpos, alibi, attn_heads) and returns: new_future_mask