class_docstr: Multi-headed attention from 'Attention Is All You Need' paper
class_docstr_tok: ["Multi-headed","attention","from","'Attention","Is","All","You","Need","'","paper"]
docstr: Split the last dimension into (num_heads, head_dim) without making any copies, results share same memory
  storage as `fused_qkv`
  
  Args:
      fused_qkv (`torch.tensor`, *required*): [batch_size, seq_length, num_heads * 3 * head_dim]
  
  Returns:
      query: [batch_size, seq_length, num_heads, head_dim] key: [batch_size, seq_length, num_heads, head_dim]
      value: [batch_size, seq_length, num_heads, head_dim]
docstr_tok: ["Split","the","last","dimension","into","(","num_heads",",","head_dim",")","without","making","any","copies",",","results","share","same","memory","storage","as","`","fused_qkv","`","Args",":","fused_qkv","(","`","torch.tensor","`",",","*","required","*",")",":","[","batch_size",",","seq_length",",","num_heads","*","3","*","head_dim","]","Returns",":","query",":","[","batch_size",",","seq_length",",","num_heads",",","head_dim","]","key",":","[","batch_size",",","seq_length",",","num_heads",",","head_dim","]","value",":","[","batch_size",",","seq_length",",","num_heads",",","head_dim","]"]
code: def _split_heads(
      self, fused_qkv: torch.Tensor
  ) -> Tuple[torch.Tensor, torch.Tensor, torch.Tensor]:
      """
      Split the last dimension into (num_heads, head_dim) without making any copies, results share same memory
      storage as `fused_qkv`
  
      Args:
          fused_qkv (`torch.tensor`, *required*): [batch_size, seq_length, num_heads * 3 * head_dim]
  
      Returns:
          query: [batch_size, seq_length, num_heads, head_dim] key: [batch_size, seq_length, num_heads, head_dim]
          value: [batch_size, seq_length, num_heads, head_dim]
      """
      batch_size, seq_length, three_times_hidden_size = fused_qkv.shape
      fused_qkv = fused_qkv.view(
          batch_size, seq_length, self.num_heads, 3, self.head_dim
      )
      return (
          fused_qkv[..., 0, :],
          fused_qkv[..., 1, :],
          fused_qkv[..., 2, :],
      )
  
imports: import math
  from typing import List, Optional, Tuple, Union
  import torch
  import torch.utils.checkpoint
  from torch import nn
  from torch.nn import BCEWithLogitsLoss, CrossEntropyLoss, MSELoss
  from ...activations import ACT2FN
  from ...cache_utils import Cache, DynamicCache
  from ...modeling_attn_mask_utils import _prepare_4d_causal_attention_mask
  from ...modeling_outputs import BaseModelOutputWithPast, CausalLMOutputWithPast, SequenceClassifierOutputWithPast
  from ...modeling_utils import PreTrainedModel
  from ...utils import add_start_docstrings, add_start_docstrings_to_model_forward, logging, replace_return_docstrings
  from .configuration_persimmon import PersimmonConfig
label_desc: Use image node_id 3 for calling the PersimmonAttention obj's underlying member method code with example usage: obj._split_heads(fused_qkv) and returns: fused_qkv,  fused_qkv,  fused_qkv