File size: 1,360 Bytes
d7ff85b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
[
  {
    "function_name": "simpo_loss",
    "file_path": "SimPO/scripts/simpo_loss_calc.py",
    "function_calls": [
      {
        "function_call_name": "to",
        "functionality": "Moves the input tensor to the specified device (e.g., CPU, GPU).",
        "input": "tensor (torch.FloatTensor), device (accelerator_device)",
        "output": "tensor (torch.FloatTensor)",
        "location_or_namespace": "torch"
      },
      {
        "function_call_name": "logsigmoid",
        "functionality": "Applies the logarithm of the sigmoid function to the input tensor.",
        "input": "input (torch.Tensor)",
        "output": "output (torch.Tensor)",
        "location_or_namespace": "torch.nn.functional"
      },
      {
        "function_call_name": "relu",
        "functionality": "Applies the Rectified Linear Unit (ReLU) function element-wise. Specifically, `relu(x) = max(0, x)`.",
        "input": "input (torch.Tensor)",
        "output": "output (torch.Tensor)",
        "location_or_namespace": "torch"
      },
      {
        "function_call_name": "detach",
        "functionality": "Returns a new tensor, detached from the current graph. The result will never require gradient.",
        "input": "tensor (torch.FloatTensor)",
        "output": "tensor (torch.FloatTensor)",
        "location_or_namespace": "torch"
      }
    ]
  }
]