ZTWHHH commited on
Commit
42bbda7
·
verified ·
1 Parent(s): 3c8cb55

Add files using upload-large-folder tool

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. .gitattributes +4 -0
  2. videollama2/lib/python3.10/site-packages/sklearn/ensemble/_hist_gradient_boosting/_binning.cpython-310-x86_64-linux-gnu.so +3 -0
  3. videollama2/lib/python3.10/site-packages/sklearn/tree/_tree.cpython-310-x86_64-linux-gnu.so +3 -0
  4. videollama2/lib/python3.10/site-packages/sklearn/utils/_bunch.py +48 -0
  5. videollama2/lib/python3.10/site-packages/sklearn/utils/_cython_blas.cpython-310-x86_64-linux-gnu.so +3 -0
  6. videollama2/lib/python3.10/site-packages/sklearn/utils/_encode.py +366 -0
  7. videollama2/lib/python3.10/site-packages/sklearn/utils/_heap.pxd +14 -0
  8. videollama2/lib/python3.10/site-packages/sklearn/utils/arrayfuncs.cpython-310-x86_64-linux-gnu.so +3 -0
  9. videollama2/lib/python3.10/site-packages/sklearn/utils/multiclass.py +544 -0
  10. videollama2/lib/python3.10/site-packages/sklearn/utils/murmurhash.pxd +21 -0
  11. vllm/lib/python3.10/site-packages/torch/include/ATen/ops/_adaptive_avg_pool3d_backward_compositeexplicitautograd_dispatch.h +24 -0
  12. vllm/lib/python3.10/site-packages/torch/include/ATen/ops/_assert_async_native.h +24 -0
  13. vllm/lib/python3.10/site-packages/torch/include/ATen/ops/_cast_Double_compositeimplicitautograd_dispatch.h +23 -0
  14. vllm/lib/python3.10/site-packages/torch/include/ATen/ops/_cast_Short.h +30 -0
  15. vllm/lib/python3.10/site-packages/torch/include/ATen/ops/_coalesced_meta_dispatch.h +23 -0
  16. vllm/lib/python3.10/site-packages/torch/include/ATen/ops/_fft_r2c_cpu_dispatch.h +25 -0
  17. vllm/lib/python3.10/site-packages/torch/include/ATen/ops/_foreach_zero_cuda_dispatch.h +23 -0
  18. vllm/lib/python3.10/site-packages/torch/include/ATen/ops/_grid_sampler_2d_cpu_fallback_compositeexplicitautograd_dispatch.h +25 -0
  19. vllm/lib/python3.10/site-packages/torch/include/ATen/ops/_linalg_svd_cpu_dispatch.h +25 -0
  20. vllm/lib/python3.10/site-packages/torch/include/ATen/ops/_local_scalar_dense_cpu_dispatch.h +23 -0
  21. vllm/lib/python3.10/site-packages/torch/include/ATen/ops/_nested_sum_backward_native.h +21 -0
  22. vllm/lib/python3.10/site-packages/torch/include/ATen/ops/_resize_output_compositeexplicitautograd_dispatch.h +28 -0
  23. vllm/lib/python3.10/site-packages/torch/include/ATen/ops/_scaled_dot_product_cudnn_attention.h +30 -0
  24. vllm/lib/python3.10/site-packages/torch/include/ATen/ops/_thnn_fused_lstm_cell_ops.h +39 -0
  25. vllm/lib/python3.10/site-packages/torch/include/ATen/ops/_upsample_nearest_exact2d_compositeimplicitautograd_dispatch.h +24 -0
  26. vllm/lib/python3.10/site-packages/torch/include/ATen/ops/_validate_sparse_bsc_tensor_args.h +30 -0
  27. vllm/lib/python3.10/site-packages/torch/include/ATen/ops/_validate_sparse_compressed_tensor_args_compositeimplicitautograd_dispatch.h +23 -0
  28. vllm/lib/python3.10/site-packages/torch/include/ATen/ops/acos_meta.h +27 -0
  29. vllm/lib/python3.10/site-packages/torch/include/ATen/ops/aminmax_meta.h +27 -0
  30. vllm/lib/python3.10/site-packages/torch/include/ATen/ops/angle.h +39 -0
  31. vllm/lib/python3.10/site-packages/torch/include/ATen/ops/any_native.h +34 -0
  32. vllm/lib/python3.10/site-packages/torch/include/ATen/ops/arctan_compositeimplicitautograd_dispatch.h +26 -0
  33. vllm/lib/python3.10/site-packages/torch/include/ATen/ops/avg_pool2d_backward_meta.h +27 -0
  34. vllm/lib/python3.10/site-packages/torch/include/ATen/ops/bernoulli_meta_dispatch.h +24 -0
  35. vllm/lib/python3.10/site-packages/torch/include/ATen/ops/blackman_window_native.h +24 -0
  36. vllm/lib/python3.10/site-packages/torch/include/ATen/ops/block_diag_native.h +22 -0
  37. vllm/lib/python3.10/site-packages/torch/include/ATen/ops/concat_compositeimplicitautograd_dispatch.h +28 -0
  38. vllm/lib/python3.10/site-packages/torch/include/ATen/ops/cudnn_affine_grid_generator_compositeexplicitautograd_dispatch.h +24 -0
  39. vllm/lib/python3.10/site-packages/torch/include/ATen/ops/cumprod_meta_dispatch.h +26 -0
  40. vllm/lib/python3.10/site-packages/torch/include/ATen/ops/det_ops.h +28 -0
  41. vllm/lib/python3.10/site-packages/torch/include/ATen/ops/diag_embed_native.h +22 -0
  42. vllm/lib/python3.10/site-packages/torch/include/ATen/ops/diagonal.h +35 -0
  43. vllm/lib/python3.10/site-packages/torch/include/ATen/ops/equal_cpu_dispatch.h +23 -0
  44. vllm/lib/python3.10/site-packages/torch/include/ATen/ops/erfc_compositeexplicitautogradnonfunctional_dispatch.h +24 -0
  45. vllm/lib/python3.10/site-packages/torch/include/ATen/ops/exp2_meta.h +27 -0
  46. vllm/lib/python3.10/site-packages/torch/include/ATen/ops/fake_quantize_per_channel_affine_cachemask_backward_native.h +21 -0
  47. vllm/lib/python3.10/site-packages/torch/include/ATen/ops/fake_quantize_per_tensor_affine_cachemask_cpu_dispatch.h +23 -0
  48. vllm/lib/python3.10/site-packages/torch/include/ATen/ops/fbgemm_linear_int8_weight_fp32_activation_compositeimplicitautograd_dispatch.h +23 -0
  49. vllm/lib/python3.10/site-packages/torch/include/ATen/ops/frac_meta.h +27 -0
  50. vllm/lib/python3.10/site-packages/torch/include/ATen/ops/gcd.h +44 -0
.gitattributes CHANGED
@@ -1911,3 +1911,7 @@ parrot/lib/python3.10/site-packages/scipy/sparse/linalg/_propack/_spropack.cpyth
1911
  parrot/lib/python3.10/site-packages/narwhals/__pycache__/expr.cpython-310.pyc filter=lfs diff=lfs merge=lfs -text
1912
  parrot/lib/python3.10/site-packages/scipy/integrate/_quadpack.cpython-310-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text
1913
  videollama2/lib/python3.10/site-packages/sklearn/cluster/_dbscan_inner.cpython-310-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text
 
 
 
 
 
1911
  parrot/lib/python3.10/site-packages/narwhals/__pycache__/expr.cpython-310.pyc filter=lfs diff=lfs merge=lfs -text
1912
  parrot/lib/python3.10/site-packages/scipy/integrate/_quadpack.cpython-310-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text
1913
  videollama2/lib/python3.10/site-packages/sklearn/cluster/_dbscan_inner.cpython-310-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text
1914
+ videollama2/lib/python3.10/site-packages/sklearn/tree/_tree.cpython-310-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text
1915
+ videollama2/lib/python3.10/site-packages/sklearn/ensemble/_hist_gradient_boosting/_binning.cpython-310-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text
1916
+ videollama2/lib/python3.10/site-packages/sklearn/utils/arrayfuncs.cpython-310-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text
1917
+ videollama2/lib/python3.10/site-packages/sklearn/utils/_cython_blas.cpython-310-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text
videollama2/lib/python3.10/site-packages/sklearn/ensemble/_hist_gradient_boosting/_binning.cpython-310-x86_64-linux-gnu.so ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e060e3174c3b221b79532dff41314d074c9210e122f3eacb36c3020bbe0232b5
3
+ size 192009
videollama2/lib/python3.10/site-packages/sklearn/tree/_tree.cpython-310-x86_64-linux-gnu.so ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:34bc522f51131a8c59011338c951880845d395e26e3f2bcd37052cac388feb8c
3
+ size 608473
videollama2/lib/python3.10/site-packages/sklearn/utils/_bunch.py ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ class Bunch(dict):
2
+ """Container object exposing keys as attributes.
3
+
4
+ Bunch objects are sometimes used as an output for functions and methods.
5
+ They extend dictionaries by enabling values to be accessed by key,
6
+ `bunch["value_key"]`, or by an attribute, `bunch.value_key`.
7
+
8
+ Examples
9
+ --------
10
+ >>> from sklearn.utils import Bunch
11
+ >>> b = Bunch(a=1, b=2)
12
+ >>> b['b']
13
+ 2
14
+ >>> b.b
15
+ 2
16
+ >>> b.a = 3
17
+ >>> b['a']
18
+ 3
19
+ >>> b.c = 6
20
+ >>> b['c']
21
+ 6
22
+ """
23
+
24
+ def __init__(self, **kwargs):
25
+ super().__init__(kwargs)
26
+
27
+ def __setattr__(self, key, value):
28
+ self[key] = value
29
+
30
+ def __dir__(self):
31
+ return self.keys()
32
+
33
+ def __getattr__(self, key):
34
+ try:
35
+ return self[key]
36
+ except KeyError:
37
+ raise AttributeError(key)
38
+
39
+ def __setstate__(self, state):
40
+ # Bunch pickles generated with scikit-learn 0.16.* have an non
41
+ # empty __dict__. This causes a surprising behaviour when
42
+ # loading these pickles scikit-learn 0.17: reading bunch.key
43
+ # uses __dict__ but assigning to bunch.key use __setattr__ and
44
+ # only changes bunch['key']. More details can be found at:
45
+ # https://github.com/scikit-learn/scikit-learn/issues/6196.
46
+ # Overriding __setstate__ to be a noop has the effect of
47
+ # ignoring the pickled __dict__
48
+ pass
videollama2/lib/python3.10/site-packages/sklearn/utils/_cython_blas.cpython-310-x86_64-linux-gnu.so ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a22867385ad512d72f541d2730185ee65ec56027b5f5d966274d5f9673b03d78
3
+ size 405265
videollama2/lib/python3.10/site-packages/sklearn/utils/_encode.py ADDED
@@ -0,0 +1,366 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from contextlib import suppress
2
+ from collections import Counter
3
+ from typing import NamedTuple
4
+
5
+ import numpy as np
6
+ from . import is_scalar_nan
7
+
8
+
9
+ def _unique(values, *, return_inverse=False, return_counts=False):
10
+ """Helper function to find unique values with support for python objects.
11
+
12
+ Uses pure python method for object dtype, and numpy method for
13
+ all other dtypes.
14
+
15
+ Parameters
16
+ ----------
17
+ values : ndarray
18
+ Values to check for unknowns.
19
+
20
+ return_inverse : bool, default=False
21
+ If True, also return the indices of the unique values.
22
+
23
+ return_counts : bool, default=False
24
+ If True, also return the number of times each unique item appears in
25
+ values.
26
+
27
+ Returns
28
+ -------
29
+ unique : ndarray
30
+ The sorted unique values.
31
+
32
+ unique_inverse : ndarray
33
+ The indices to reconstruct the original array from the unique array.
34
+ Only provided if `return_inverse` is True.
35
+
36
+ unique_counts : ndarray
37
+ The number of times each of the unique values comes up in the original
38
+ array. Only provided if `return_counts` is True.
39
+ """
40
+ if values.dtype == object:
41
+ return _unique_python(
42
+ values, return_inverse=return_inverse, return_counts=return_counts
43
+ )
44
+ # numerical
45
+ return _unique_np(
46
+ values, return_inverse=return_inverse, return_counts=return_counts
47
+ )
48
+
49
+
50
+ def _unique_np(values, return_inverse=False, return_counts=False):
51
+ """Helper function to find unique values for numpy arrays that correctly
52
+ accounts for nans. See `_unique` documentation for details."""
53
+ uniques = np.unique(
54
+ values, return_inverse=return_inverse, return_counts=return_counts
55
+ )
56
+
57
+ inverse, counts = None, None
58
+
59
+ if return_counts:
60
+ *uniques, counts = uniques
61
+
62
+ if return_inverse:
63
+ *uniques, inverse = uniques
64
+
65
+ if return_counts or return_inverse:
66
+ uniques = uniques[0]
67
+
68
+ # np.unique will have duplicate missing values at the end of `uniques`
69
+ # here we clip the nans and remove it from uniques
70
+ if uniques.size and is_scalar_nan(uniques[-1]):
71
+ nan_idx = np.searchsorted(uniques, np.nan)
72
+ uniques = uniques[: nan_idx + 1]
73
+ if return_inverse:
74
+ inverse[inverse > nan_idx] = nan_idx
75
+
76
+ if return_counts:
77
+ counts[nan_idx] = np.sum(counts[nan_idx:])
78
+ counts = counts[: nan_idx + 1]
79
+
80
+ ret = (uniques,)
81
+
82
+ if return_inverse:
83
+ ret += (inverse,)
84
+
85
+ if return_counts:
86
+ ret += (counts,)
87
+
88
+ return ret[0] if len(ret) == 1 else ret
89
+
90
+
91
+ class MissingValues(NamedTuple):
92
+ """Data class for missing data information"""
93
+
94
+ nan: bool
95
+ none: bool
96
+
97
+ def to_list(self):
98
+ """Convert tuple to a list where None is always first."""
99
+ output = []
100
+ if self.none:
101
+ output.append(None)
102
+ if self.nan:
103
+ output.append(np.nan)
104
+ return output
105
+
106
+
107
+ def _extract_missing(values):
108
+ """Extract missing values from `values`.
109
+
110
+ Parameters
111
+ ----------
112
+ values: set
113
+ Set of values to extract missing from.
114
+
115
+ Returns
116
+ -------
117
+ output: set
118
+ Set with missing values extracted.
119
+
120
+ missing_values: MissingValues
121
+ Object with missing value information.
122
+ """
123
+ missing_values_set = {
124
+ value for value in values if value is None or is_scalar_nan(value)
125
+ }
126
+
127
+ if not missing_values_set:
128
+ return values, MissingValues(nan=False, none=False)
129
+
130
+ if None in missing_values_set:
131
+ if len(missing_values_set) == 1:
132
+ output_missing_values = MissingValues(nan=False, none=True)
133
+ else:
134
+ # If there is more than one missing value, then it has to be
135
+ # float('nan') or np.nan
136
+ output_missing_values = MissingValues(nan=True, none=True)
137
+ else:
138
+ output_missing_values = MissingValues(nan=True, none=False)
139
+
140
+ # create set without the missing values
141
+ output = values - missing_values_set
142
+ return output, output_missing_values
143
+
144
+
145
+ class _nandict(dict):
146
+ """Dictionary with support for nans."""
147
+
148
+ def __init__(self, mapping):
149
+ super().__init__(mapping)
150
+ for key, value in mapping.items():
151
+ if is_scalar_nan(key):
152
+ self.nan_value = value
153
+ break
154
+
155
+ def __missing__(self, key):
156
+ if hasattr(self, "nan_value") and is_scalar_nan(key):
157
+ return self.nan_value
158
+ raise KeyError(key)
159
+
160
+
161
+ def _map_to_integer(values, uniques):
162
+ """Map values based on its position in uniques."""
163
+ table = _nandict({val: i for i, val in enumerate(uniques)})
164
+ return np.array([table[v] for v in values])
165
+
166
+
167
+ def _unique_python(values, *, return_inverse, return_counts):
168
+ # Only used in `_uniques`, see docstring there for details
169
+ try:
170
+ uniques_set = set(values)
171
+ uniques_set, missing_values = _extract_missing(uniques_set)
172
+
173
+ uniques = sorted(uniques_set)
174
+ uniques.extend(missing_values.to_list())
175
+ uniques = np.array(uniques, dtype=values.dtype)
176
+ except TypeError:
177
+ types = sorted(t.__qualname__ for t in set(type(v) for v in values))
178
+ raise TypeError(
179
+ "Encoders require their input to be uniformly "
180
+ f"strings or numbers. Got {types}"
181
+ )
182
+ ret = (uniques,)
183
+
184
+ if return_inverse:
185
+ ret += (_map_to_integer(values, uniques),)
186
+
187
+ if return_counts:
188
+ ret += (_get_counts(values, uniques),)
189
+
190
+ return ret[0] if len(ret) == 1 else ret
191
+
192
+
193
+ def _encode(values, *, uniques, check_unknown=True):
194
+ """Helper function to encode values into [0, n_uniques - 1].
195
+
196
+ Uses pure python method for object dtype, and numpy method for
197
+ all other dtypes.
198
+ The numpy method has the limitation that the `uniques` need to
199
+ be sorted. Importantly, this is not checked but assumed to already be
200
+ the case. The calling method needs to ensure this for all non-object
201
+ values.
202
+
203
+ Parameters
204
+ ----------
205
+ values : ndarray
206
+ Values to encode.
207
+ uniques : ndarray
208
+ The unique values in `values`. If the dtype is not object, then
209
+ `uniques` needs to be sorted.
210
+ check_unknown : bool, default=True
211
+ If True, check for values in `values` that are not in `unique`
212
+ and raise an error. This is ignored for object dtype, and treated as
213
+ True in this case. This parameter is useful for
214
+ _BaseEncoder._transform() to avoid calling _check_unknown()
215
+ twice.
216
+
217
+ Returns
218
+ -------
219
+ encoded : ndarray
220
+ Encoded values
221
+ """
222
+ if values.dtype.kind in "OUS":
223
+ try:
224
+ return _map_to_integer(values, uniques)
225
+ except KeyError as e:
226
+ raise ValueError(f"y contains previously unseen labels: {str(e)}")
227
+ else:
228
+ if check_unknown:
229
+ diff = _check_unknown(values, uniques)
230
+ if diff:
231
+ raise ValueError(f"y contains previously unseen labels: {str(diff)}")
232
+ return np.searchsorted(uniques, values)
233
+
234
+
235
+ def _check_unknown(values, known_values, return_mask=False):
236
+ """
237
+ Helper function to check for unknowns in values to be encoded.
238
+
239
+ Uses pure python method for object dtype, and numpy method for
240
+ all other dtypes.
241
+
242
+ Parameters
243
+ ----------
244
+ values : array
245
+ Values to check for unknowns.
246
+ known_values : array
247
+ Known values. Must be unique.
248
+ return_mask : bool, default=False
249
+ If True, return a mask of the same shape as `values` indicating
250
+ the valid values.
251
+
252
+ Returns
253
+ -------
254
+ diff : list
255
+ The unique values present in `values` and not in `know_values`.
256
+ valid_mask : boolean array
257
+ Additionally returned if ``return_mask=True``.
258
+
259
+ """
260
+ valid_mask = None
261
+
262
+ if values.dtype.kind in "OUS":
263
+ values_set = set(values)
264
+ values_set, missing_in_values = _extract_missing(values_set)
265
+
266
+ uniques_set = set(known_values)
267
+ uniques_set, missing_in_uniques = _extract_missing(uniques_set)
268
+ diff = values_set - uniques_set
269
+
270
+ nan_in_diff = missing_in_values.nan and not missing_in_uniques.nan
271
+ none_in_diff = missing_in_values.none and not missing_in_uniques.none
272
+
273
+ def is_valid(value):
274
+ return (
275
+ value in uniques_set
276
+ or missing_in_uniques.none
277
+ and value is None
278
+ or missing_in_uniques.nan
279
+ and is_scalar_nan(value)
280
+ )
281
+
282
+ if return_mask:
283
+ if diff or nan_in_diff or none_in_diff:
284
+ valid_mask = np.array([is_valid(value) for value in values])
285
+ else:
286
+ valid_mask = np.ones(len(values), dtype=bool)
287
+
288
+ diff = list(diff)
289
+ if none_in_diff:
290
+ diff.append(None)
291
+ if nan_in_diff:
292
+ diff.append(np.nan)
293
+ else:
294
+ unique_values = np.unique(values)
295
+ diff = np.setdiff1d(unique_values, known_values, assume_unique=True)
296
+ if return_mask:
297
+ if diff.size:
298
+ valid_mask = np.in1d(values, known_values)
299
+ else:
300
+ valid_mask = np.ones(len(values), dtype=bool)
301
+
302
+ # check for nans in the known_values
303
+ if np.isnan(known_values).any():
304
+ diff_is_nan = np.isnan(diff)
305
+ if diff_is_nan.any():
306
+ # removes nan from valid_mask
307
+ if diff.size and return_mask:
308
+ is_nan = np.isnan(values)
309
+ valid_mask[is_nan] = 1
310
+
311
+ # remove nan from diff
312
+ diff = diff[~diff_is_nan]
313
+ diff = list(diff)
314
+
315
+ if return_mask:
316
+ return diff, valid_mask
317
+ return diff
318
+
319
+
320
+ class _NaNCounter(Counter):
321
+ """Counter with support for nan values."""
322
+
323
+ def __init__(self, items):
324
+ super().__init__(self._generate_items(items))
325
+
326
+ def _generate_items(self, items):
327
+ """Generate items without nans. Stores the nan counts separately."""
328
+ for item in items:
329
+ if not is_scalar_nan(item):
330
+ yield item
331
+ continue
332
+ if not hasattr(self, "nan_count"):
333
+ self.nan_count = 0
334
+ self.nan_count += 1
335
+
336
+ def __missing__(self, key):
337
+ if hasattr(self, "nan_count") and is_scalar_nan(key):
338
+ return self.nan_count
339
+ raise KeyError(key)
340
+
341
+
342
+ def _get_counts(values, uniques):
343
+ """Get the count of each of the `uniques` in `values`.
344
+
345
+ The counts will use the order passed in by `uniques`. For non-object dtypes,
346
+ `uniques` is assumed to be sorted and `np.nan` is at the end.
347
+ """
348
+ if values.dtype.kind in "OU":
349
+ counter = _NaNCounter(values)
350
+ output = np.zeros(len(uniques), dtype=np.int64)
351
+ for i, item in enumerate(uniques):
352
+ with suppress(KeyError):
353
+ output[i] = counter[item]
354
+ return output
355
+
356
+ unique_values, counts = _unique_np(values, return_counts=True)
357
+
358
+ # Recorder unique_values based on input: `uniques`
359
+ uniques_in_values = np.isin(uniques, unique_values, assume_unique=True)
360
+ if np.isnan(unique_values[-1]) and np.isnan(uniques[-1]):
361
+ uniques_in_values[-1] = True
362
+
363
+ unique_valid_indices = np.searchsorted(unique_values, uniques[uniques_in_values])
364
+ output = np.zeros_like(uniques, dtype=np.int64)
365
+ output[uniques_in_values] = counts[unique_valid_indices]
366
+ return output
videollama2/lib/python3.10/site-packages/sklearn/utils/_heap.pxd ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Heap routines, used in various Cython implementations.
2
+
3
+ from cython cimport floating
4
+
5
+ from ._typedefs cimport ITYPE_t
6
+
7
+
8
+ cdef int heap_push(
9
+ floating* values,
10
+ ITYPE_t* indices,
11
+ ITYPE_t size,
12
+ floating val,
13
+ ITYPE_t val_idx,
14
+ ) nogil
videollama2/lib/python3.10/site-packages/sklearn/utils/arrayfuncs.cpython-310-x86_64-linux-gnu.so ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5b9ea5972ba77fcb26298b18ea9968c29d8e6045e2aba0a5114ebbabb76598cd
3
+ size 229057
videollama2/lib/python3.10/site-packages/sklearn/utils/multiclass.py ADDED
@@ -0,0 +1,544 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Author: Arnaud Joly, Joel Nothman, Hamzeh Alsalhi
2
+ #
3
+ # License: BSD 3 clause
4
+ """
5
+ Multi-class / multi-label utility function
6
+ ==========================================
7
+
8
+ """
9
+ from collections.abc import Sequence
10
+ from itertools import chain
11
+ import warnings
12
+
13
+ from scipy.sparse import issparse
14
+ from scipy.sparse import dok_matrix
15
+ from scipy.sparse import lil_matrix
16
+
17
+ import numpy as np
18
+
19
+ from .validation import check_array, _assert_all_finite
20
+ from ..utils._array_api import get_namespace
21
+
22
+
23
+ def _unique_multiclass(y):
24
+ xp, is_array_api = get_namespace(y)
25
+ if hasattr(y, "__array__") or is_array_api:
26
+ return xp.unique_values(xp.asarray(y))
27
+ else:
28
+ return set(y)
29
+
30
+
31
+ def _unique_indicator(y):
32
+ return np.arange(
33
+ check_array(y, input_name="y", accept_sparse=["csr", "csc", "coo"]).shape[1]
34
+ )
35
+
36
+
37
+ _FN_UNIQUE_LABELS = {
38
+ "binary": _unique_multiclass,
39
+ "multiclass": _unique_multiclass,
40
+ "multilabel-indicator": _unique_indicator,
41
+ }
42
+
43
+
44
+ def unique_labels(*ys):
45
+ """Extract an ordered array of unique labels.
46
+
47
+ We don't allow:
48
+ - mix of multilabel and multiclass (single label) targets
49
+ - mix of label indicator matrix and anything else,
50
+ because there are no explicit labels)
51
+ - mix of label indicator matrices of different sizes
52
+ - mix of string and integer labels
53
+
54
+ At the moment, we also don't allow "multiclass-multioutput" input type.
55
+
56
+ Parameters
57
+ ----------
58
+ *ys : array-likes
59
+ Label values.
60
+
61
+ Returns
62
+ -------
63
+ out : ndarray of shape (n_unique_labels,)
64
+ An ordered array of unique labels.
65
+
66
+ Examples
67
+ --------
68
+ >>> from sklearn.utils.multiclass import unique_labels
69
+ >>> unique_labels([3, 5, 5, 5, 7, 7])
70
+ array([3, 5, 7])
71
+ >>> unique_labels([1, 2, 3, 4], [2, 2, 3, 4])
72
+ array([1, 2, 3, 4])
73
+ >>> unique_labels([1, 2, 10], [5, 11])
74
+ array([ 1, 2, 5, 10, 11])
75
+ """
76
+ xp, is_array_api = get_namespace(*ys)
77
+ if not ys:
78
+ raise ValueError("No argument has been passed.")
79
+ # Check that we don't mix label format
80
+
81
+ ys_types = set(type_of_target(x) for x in ys)
82
+ if ys_types == {"binary", "multiclass"}:
83
+ ys_types = {"multiclass"}
84
+
85
+ if len(ys_types) > 1:
86
+ raise ValueError("Mix type of y not allowed, got types %s" % ys_types)
87
+
88
+ label_type = ys_types.pop()
89
+
90
+ # Check consistency for the indicator format
91
+ if (
92
+ label_type == "multilabel-indicator"
93
+ and len(
94
+ set(
95
+ check_array(y, accept_sparse=["csr", "csc", "coo"]).shape[1] for y in ys
96
+ )
97
+ )
98
+ > 1
99
+ ):
100
+ raise ValueError(
101
+ "Multi-label binary indicator input with different numbers of labels"
102
+ )
103
+
104
+ # Get the unique set of labels
105
+ _unique_labels = _FN_UNIQUE_LABELS.get(label_type, None)
106
+ if not _unique_labels:
107
+ raise ValueError("Unknown label type: %s" % repr(ys))
108
+
109
+ if is_array_api:
110
+ # array_api does not allow for mixed dtypes
111
+ unique_ys = xp.concat([_unique_labels(y) for y in ys])
112
+ return xp.unique_values(unique_ys)
113
+
114
+ ys_labels = set(chain.from_iterable((i for i in _unique_labels(y)) for y in ys))
115
+ # Check that we don't mix string type with number type
116
+ if len(set(isinstance(label, str) for label in ys_labels)) > 1:
117
+ raise ValueError("Mix of label input types (string and number)")
118
+
119
+ return xp.asarray(sorted(ys_labels))
120
+
121
+
122
+ def _is_integral_float(y):
123
+ return y.dtype.kind == "f" and np.all(y.astype(int) == y)
124
+
125
+
126
+ def is_multilabel(y):
127
+ """Check if ``y`` is in a multilabel format.
128
+
129
+ Parameters
130
+ ----------
131
+ y : ndarray of shape (n_samples,)
132
+ Target values.
133
+
134
+ Returns
135
+ -------
136
+ out : bool
137
+ Return ``True``, if ``y`` is in a multilabel format, else ```False``.
138
+
139
+ Examples
140
+ --------
141
+ >>> import numpy as np
142
+ >>> from sklearn.utils.multiclass import is_multilabel
143
+ >>> is_multilabel([0, 1, 0, 1])
144
+ False
145
+ >>> is_multilabel([[1], [0, 2], []])
146
+ False
147
+ >>> is_multilabel(np.array([[1, 0], [0, 0]]))
148
+ True
149
+ >>> is_multilabel(np.array([[1], [0], [0]]))
150
+ False
151
+ >>> is_multilabel(np.array([[1, 0, 0]]))
152
+ True
153
+ """
154
+ xp, is_array_api = get_namespace(y)
155
+ if hasattr(y, "__array__") or isinstance(y, Sequence) or is_array_api:
156
+ # DeprecationWarning will be replaced by ValueError, see NEP 34
157
+ # https://numpy.org/neps/nep-0034-infer-dtype-is-object.html
158
+ check_y_kwargs = dict(
159
+ accept_sparse=True,
160
+ allow_nd=True,
161
+ force_all_finite=False,
162
+ ensure_2d=False,
163
+ ensure_min_samples=0,
164
+ ensure_min_features=0,
165
+ )
166
+ with warnings.catch_warnings():
167
+ warnings.simplefilter("error", np.VisibleDeprecationWarning)
168
+ try:
169
+ y = check_array(y, dtype=None, **check_y_kwargs)
170
+ except (np.VisibleDeprecationWarning, ValueError) as e:
171
+ if str(e).startswith("Complex data not supported"):
172
+ raise
173
+
174
+ # dtype=object should be provided explicitly for ragged arrays,
175
+ # see NEP 34
176
+ y = check_array(y, dtype=object, **check_y_kwargs)
177
+
178
+ if not (hasattr(y, "shape") and y.ndim == 2 and y.shape[1] > 1):
179
+ return False
180
+
181
+ if issparse(y):
182
+ if isinstance(y, (dok_matrix, lil_matrix)):
183
+ y = y.tocsr()
184
+ labels = xp.unique_values(y.data)
185
+ return (
186
+ len(y.data) == 0
187
+ or (labels.size == 1 or (labels.size == 2) and (0 in labels))
188
+ and (y.dtype.kind in "biu" or _is_integral_float(labels)) # bool, int, uint
189
+ )
190
+ else:
191
+ labels = xp.unique_values(y)
192
+
193
+ return len(labels) < 3 and (
194
+ y.dtype.kind in "biu" or _is_integral_float(labels) # bool, int, uint
195
+ )
196
+
197
+
198
+ def check_classification_targets(y):
199
+ """Ensure that target y is of a non-regression type.
200
+
201
+ Only the following target types (as defined in type_of_target) are allowed:
202
+ 'binary', 'multiclass', 'multiclass-multioutput',
203
+ 'multilabel-indicator', 'multilabel-sequences'
204
+
205
+ Parameters
206
+ ----------
207
+ y : array-like
208
+ Target values.
209
+ """
210
+ y_type = type_of_target(y, input_name="y")
211
+ if y_type not in [
212
+ "binary",
213
+ "multiclass",
214
+ "multiclass-multioutput",
215
+ "multilabel-indicator",
216
+ "multilabel-sequences",
217
+ ]:
218
+ raise ValueError("Unknown label type: %r" % y_type)
219
+
220
+
221
+ def type_of_target(y, input_name=""):
222
+ """Determine the type of data indicated by the target.
223
+
224
+ Note that this type is the most specific type that can be inferred.
225
+ For example:
226
+
227
+ * ``binary`` is more specific but compatible with ``multiclass``.
228
+ * ``multiclass`` of integers is more specific but compatible with
229
+ ``continuous``.
230
+ * ``multilabel-indicator`` is more specific but compatible with
231
+ ``multiclass-multioutput``.
232
+
233
+ Parameters
234
+ ----------
235
+ y : {array-like, sparse matrix}
236
+ Target values. If a sparse matrix, `y` is expected to be a
237
+ CSR/CSC matrix.
238
+
239
+ input_name : str, default=""
240
+ The data name used to construct the error message.
241
+
242
+ .. versionadded:: 1.1.0
243
+
244
+ Returns
245
+ -------
246
+ target_type : str
247
+ One of:
248
+
249
+ * 'continuous': `y` is an array-like of floats that are not all
250
+ integers, and is 1d or a column vector.
251
+ * 'continuous-multioutput': `y` is a 2d array of floats that are
252
+ not all integers, and both dimensions are of size > 1.
253
+ * 'binary': `y` contains <= 2 discrete values and is 1d or a column
254
+ vector.
255
+ * 'multiclass': `y` contains more than two discrete values, is not a
256
+ sequence of sequences, and is 1d or a column vector.
257
+ * 'multiclass-multioutput': `y` is a 2d array that contains more
258
+ than two discrete values, is not a sequence of sequences, and both
259
+ dimensions are of size > 1.
260
+ * 'multilabel-indicator': `y` is a label indicator matrix, an array
261
+ of two dimensions with at least two columns, and at most 2 unique
262
+ values.
263
+ * 'unknown': `y` is array-like but none of the above, such as a 3d
264
+ array, sequence of sequences, or an array of non-sequence objects.
265
+
266
+ Examples
267
+ --------
268
+ >>> from sklearn.utils.multiclass import type_of_target
269
+ >>> import numpy as np
270
+ >>> type_of_target([0.1, 0.6])
271
+ 'continuous'
272
+ >>> type_of_target([1, -1, -1, 1])
273
+ 'binary'
274
+ >>> type_of_target(['a', 'b', 'a'])
275
+ 'binary'
276
+ >>> type_of_target([1.0, 2.0])
277
+ 'binary'
278
+ >>> type_of_target([1, 0, 2])
279
+ 'multiclass'
280
+ >>> type_of_target([1.0, 0.0, 3.0])
281
+ 'multiclass'
282
+ >>> type_of_target(['a', 'b', 'c'])
283
+ 'multiclass'
284
+ >>> type_of_target(np.array([[1, 2], [3, 1]]))
285
+ 'multiclass-multioutput'
286
+ >>> type_of_target([[1, 2]])
287
+ 'multilabel-indicator'
288
+ >>> type_of_target(np.array([[1.5, 2.0], [3.0, 1.6]]))
289
+ 'continuous-multioutput'
290
+ >>> type_of_target(np.array([[0, 1], [1, 1]]))
291
+ 'multilabel-indicator'
292
+ """
293
+ xp, is_array_api = get_namespace(y)
294
+ valid = (
295
+ (isinstance(y, Sequence) or issparse(y) or hasattr(y, "__array__"))
296
+ and not isinstance(y, str)
297
+ or is_array_api
298
+ )
299
+
300
+ if not valid:
301
+ raise ValueError(
302
+ "Expected array-like (array or non-string sequence), got %r" % y
303
+ )
304
+
305
+ sparse_pandas = y.__class__.__name__ in ["SparseSeries", "SparseArray"]
306
+ if sparse_pandas:
307
+ raise ValueError("y cannot be class 'SparseSeries' or 'SparseArray'")
308
+
309
+ if is_multilabel(y):
310
+ return "multilabel-indicator"
311
+
312
+ # DeprecationWarning will be replaced by ValueError, see NEP 34
313
+ # https://numpy.org/neps/nep-0034-infer-dtype-is-object.html
314
+ # We therefore catch both deprecation (NumPy < 1.24) warning and
315
+ # value error (NumPy >= 1.24).
316
+ check_y_kwargs = dict(
317
+ accept_sparse=True,
318
+ allow_nd=True,
319
+ force_all_finite=False,
320
+ ensure_2d=False,
321
+ ensure_min_samples=0,
322
+ ensure_min_features=0,
323
+ )
324
+
325
+ with warnings.catch_warnings():
326
+ warnings.simplefilter("error", np.VisibleDeprecationWarning)
327
+ if not issparse(y):
328
+ try:
329
+ y = check_array(y, dtype=None, **check_y_kwargs)
330
+ except (np.VisibleDeprecationWarning, ValueError) as e:
331
+ if str(e).startswith("Complex data not supported"):
332
+ raise
333
+
334
+ # dtype=object should be provided explicitly for ragged arrays,
335
+ # see NEP 34
336
+ y = check_array(y, dtype=object, **check_y_kwargs)
337
+
338
+ # The old sequence of sequences format
339
+ try:
340
+ if (
341
+ not hasattr(y[0], "__array__")
342
+ and isinstance(y[0], Sequence)
343
+ and not isinstance(y[0], str)
344
+ ):
345
+ raise ValueError(
346
+ "You appear to be using a legacy multi-label data"
347
+ " representation. Sequence of sequences are no"
348
+ " longer supported; use a binary array or sparse"
349
+ " matrix instead - the MultiLabelBinarizer"
350
+ " transformer can convert to this format."
351
+ )
352
+ except IndexError:
353
+ pass
354
+
355
+ # Invalid inputs
356
+ if y.ndim not in (1, 2):
357
+ # Number of dimension greater than 2: [[[1, 2]]]
358
+ return "unknown"
359
+ if not min(y.shape):
360
+ # Empty ndarray: []/[[]]
361
+ if y.ndim == 1:
362
+ # 1-D empty array: []
363
+ return "binary" # []
364
+ # 2-D empty array: [[]]
365
+ return "unknown"
366
+ if not issparse(y) and y.dtype == object and not isinstance(y.flat[0], str):
367
+ # [obj_1] and not ["label_1"]
368
+ return "unknown"
369
+
370
+ # Check if multioutput
371
+ if y.ndim == 2 and y.shape[1] > 1:
372
+ suffix = "-multioutput" # [[1, 2], [1, 2]]
373
+ else:
374
+ suffix = "" # [1, 2, 3] or [[1], [2], [3]]
375
+
376
+ # Check float and contains non-integer float values
377
+ if y.dtype.kind == "f":
378
+ # [.1, .2, 3] or [[.1, .2, 3]] or [[1., .2]] and not [1., 2., 3.]
379
+ data = y.data if issparse(y) else y
380
+ if xp.any(data != data.astype(int)):
381
+ _assert_all_finite(data, input_name=input_name)
382
+ return "continuous" + suffix
383
+
384
+ # Check multiclass
385
+ first_row = y[0] if not issparse(y) else y.getrow(0).data
386
+ if xp.unique_values(y).shape[0] > 2 or (y.ndim == 2 and len(first_row) > 1):
387
+ # [1, 2, 3] or [[1., 2., 3]] or [[1, 2]]
388
+ return "multiclass" + suffix
389
+ else:
390
+ return "binary" # [1, 2] or [["a"], ["b"]]
391
+
392
+
393
+ def _check_partial_fit_first_call(clf, classes=None):
394
+ """Private helper function for factorizing common classes param logic.
395
+
396
+ Estimators that implement the ``partial_fit`` API need to be provided with
397
+ the list of possible classes at the first call to partial_fit.
398
+
399
+ Subsequent calls to partial_fit should check that ``classes`` is still
400
+ consistent with a previous value of ``clf.classes_`` when provided.
401
+
402
+ This function returns True if it detects that this was the first call to
403
+ ``partial_fit`` on ``clf``. In that case the ``classes_`` attribute is also
404
+ set on ``clf``.
405
+
406
+ """
407
+ if getattr(clf, "classes_", None) is None and classes is None:
408
+ raise ValueError("classes must be passed on the first call to partial_fit.")
409
+
410
+ elif classes is not None:
411
+ if getattr(clf, "classes_", None) is not None:
412
+ if not np.array_equal(clf.classes_, unique_labels(classes)):
413
+ raise ValueError(
414
+ "`classes=%r` is not the same as on last call "
415
+ "to partial_fit, was: %r" % (classes, clf.classes_)
416
+ )
417
+
418
+ else:
419
+ # This is the first call to partial_fit
420
+ clf.classes_ = unique_labels(classes)
421
+ return True
422
+
423
+ # classes is None and clf.classes_ has already previously been set:
424
+ # nothing to do
425
+ return False
426
+
427
+
428
+ def class_distribution(y, sample_weight=None):
429
+ """Compute class priors from multioutput-multiclass target data.
430
+
431
+ Parameters
432
+ ----------
433
+ y : {array-like, sparse matrix} of size (n_samples, n_outputs)
434
+ The labels for each example.
435
+
436
+ sample_weight : array-like of shape (n_samples,), default=None
437
+ Sample weights.
438
+
439
+ Returns
440
+ -------
441
+ classes : list of size n_outputs of ndarray of size (n_classes,)
442
+ List of classes for each column.
443
+
444
+ n_classes : list of int of size n_outputs
445
+ Number of classes in each column.
446
+
447
+ class_prior : list of size n_outputs of ndarray of size (n_classes,)
448
+ Class distribution of each column.
449
+ """
450
+ classes = []
451
+ n_classes = []
452
+ class_prior = []
453
+
454
+ n_samples, n_outputs = y.shape
455
+ if sample_weight is not None:
456
+ sample_weight = np.asarray(sample_weight)
457
+
458
+ if issparse(y):
459
+ y = y.tocsc()
460
+ y_nnz = np.diff(y.indptr)
461
+
462
+ for k in range(n_outputs):
463
+ col_nonzero = y.indices[y.indptr[k] : y.indptr[k + 1]]
464
+ # separate sample weights for zero and non-zero elements
465
+ if sample_weight is not None:
466
+ nz_samp_weight = sample_weight[col_nonzero]
467
+ zeros_samp_weight_sum = np.sum(sample_weight) - np.sum(nz_samp_weight)
468
+ else:
469
+ nz_samp_weight = None
470
+ zeros_samp_weight_sum = y.shape[0] - y_nnz[k]
471
+
472
+ classes_k, y_k = np.unique(
473
+ y.data[y.indptr[k] : y.indptr[k + 1]], return_inverse=True
474
+ )
475
+ class_prior_k = np.bincount(y_k, weights=nz_samp_weight)
476
+
477
+ # An explicit zero was found, combine its weight with the weight
478
+ # of the implicit zeros
479
+ if 0 in classes_k:
480
+ class_prior_k[classes_k == 0] += zeros_samp_weight_sum
481
+
482
+ # If an there is an implicit zero and it is not in classes and
483
+ # class_prior, make an entry for it
484
+ if 0 not in classes_k and y_nnz[k] < y.shape[0]:
485
+ classes_k = np.insert(classes_k, 0, 0)
486
+ class_prior_k = np.insert(class_prior_k, 0, zeros_samp_weight_sum)
487
+
488
+ classes.append(classes_k)
489
+ n_classes.append(classes_k.shape[0])
490
+ class_prior.append(class_prior_k / class_prior_k.sum())
491
+ else:
492
+ for k in range(n_outputs):
493
+ classes_k, y_k = np.unique(y[:, k], return_inverse=True)
494
+ classes.append(classes_k)
495
+ n_classes.append(classes_k.shape[0])
496
+ class_prior_k = np.bincount(y_k, weights=sample_weight)
497
+ class_prior.append(class_prior_k / class_prior_k.sum())
498
+
499
+ return (classes, n_classes, class_prior)
500
+
501
+
502
+ def _ovr_decision_function(predictions, confidences, n_classes):
503
+ """Compute a continuous, tie-breaking OvR decision function from OvO.
504
+
505
+ It is important to include a continuous value, not only votes,
506
+ to make computing AUC or calibration meaningful.
507
+
508
+ Parameters
509
+ ----------
510
+ predictions : array-like of shape (n_samples, n_classifiers)
511
+ Predicted classes for each binary classifier.
512
+
513
+ confidences : array-like of shape (n_samples, n_classifiers)
514
+ Decision functions or predicted probabilities for positive class
515
+ for each binary classifier.
516
+
517
+ n_classes : int
518
+ Number of classes. n_classifiers must be
519
+ ``n_classes * (n_classes - 1 ) / 2``.
520
+ """
521
+ n_samples = predictions.shape[0]
522
+ votes = np.zeros((n_samples, n_classes))
523
+ sum_of_confidences = np.zeros((n_samples, n_classes))
524
+
525
+ k = 0
526
+ for i in range(n_classes):
527
+ for j in range(i + 1, n_classes):
528
+ sum_of_confidences[:, i] -= confidences[:, k]
529
+ sum_of_confidences[:, j] += confidences[:, k]
530
+ votes[predictions[:, k] == 0, i] += 1
531
+ votes[predictions[:, k] == 1, j] += 1
532
+ k += 1
533
+
534
+ # Monotonically transform the sum_of_confidences to (-1/3, 1/3)
535
+ # and add it with votes. The monotonic transformation is
536
+ # f: x -> x / (3 * (|x| + 1)), it uses 1/3 instead of 1/2
537
+ # to ensure that we won't reach the limits and change vote order.
538
+ # The motivation is to use confidence levels as a way to break ties in
539
+ # the votes without switching any decision made based on a difference
540
+ # of 1 vote.
541
+ transformed_confidences = sum_of_confidences / (
542
+ 3 * (np.abs(sum_of_confidences) + 1)
543
+ )
544
+ return votes + transformed_confidences
videollama2/lib/python3.10/site-packages/sklearn/utils/murmurhash.pxd ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """Export fast murmurhash C/C++ routines + cython wrappers"""
2
+
3
+ cimport numpy as cnp
4
+
5
+ # The C API is disabled for now, since it requires -I flags to get
6
+ # compilation to work even when these functions are not used.
7
+ #cdef extern from "MurmurHash3.h":
8
+ # void MurmurHash3_x86_32(void* key, int len, unsigned int seed,
9
+ # void* out)
10
+ #
11
+ # void MurmurHash3_x86_128(void* key, int len, unsigned int seed,
12
+ # void* out)
13
+ #
14
+ # void MurmurHash3_x64_128(void* key, int len, unsigned int seed,
15
+ # void* out)
16
+
17
+
18
+ cpdef cnp.uint32_t murmurhash3_int_u32(int key, unsigned int seed)
19
+ cpdef cnp.int32_t murmurhash3_int_s32(int key, unsigned int seed)
20
+ cpdef cnp.uint32_t murmurhash3_bytes_u32(bytes key, unsigned int seed)
21
+ cpdef cnp.int32_t murmurhash3_bytes_s32(bytes key, unsigned int seed)
vllm/lib/python3.10/site-packages/torch/include/ATen/ops/_adaptive_avg_pool3d_backward_compositeexplicitautograd_dispatch.h ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #pragma once
2
+ // @generated by torchgen/gen.py from DispatchKeyFunction.h
3
+
4
+ // NB: The implementing C++ file is RegisterDispatchKey.cpp
5
+
6
+ // The only #includes we need are for custom classes that have defaults in the C++ API
7
+ #include <c10/core/MemoryFormat.h>
8
+ #include <c10/core/Scalar.h>
9
+ #include <ATen/core/Reduction.h>
10
+
11
+ // Forward declarations of any types needed in the operator signatures.
12
+ // We can't directly include these classes because it will cause circular include dependencies.
13
+ // This file is included by TensorBody.h, which defines the Tensor class.
14
+ #include <ATen/core/ATen_fwd.h>
15
+
16
+ namespace at {
17
+
18
+ namespace compositeexplicitautograd {
19
+
20
+ TORCH_API at::Tensor & _adaptive_avg_pool3d_backward_out(at::Tensor & out, const at::Tensor & grad_output, const at::Tensor & self);
21
+ TORCH_API at::Tensor & _adaptive_avg_pool3d_backward_outf(const at::Tensor & grad_output, const at::Tensor & self, at::Tensor & out);
22
+
23
+ } // namespace compositeexplicitautograd
24
+ } // namespace at
vllm/lib/python3.10/site-packages/torch/include/ATen/ops/_assert_async_native.h ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #pragma once
2
+
3
+ // @generated by torchgen/gen.py from NativeFunction.h
4
+
5
+ #include <c10/core/Scalar.h>
6
+ #include <c10/core/Storage.h>
7
+ #include <c10/core/TensorOptions.h>
8
+ #include <c10/util/Deprecated.h>
9
+ #include <optional>
10
+ #include <c10/core/QScheme.h>
11
+ #include <ATen/core/Reduction.h>
12
+ #include <ATen/core/Tensor.h>
13
+ #include <tuple>
14
+ #include <vector>
15
+
16
+
17
+ namespace at {
18
+ namespace native {
19
+ TORCH_API void _assert_async_cpu(const at::Tensor & self);
20
+ TORCH_API void _assert_async_cuda(const at::Tensor & self);
21
+ TORCH_API void _assert_async_msg_cpu(const at::Tensor & self, c10::string_view assert_msg);
22
+ TORCH_API void _assert_async_msg_cuda(const at::Tensor & self, c10::string_view assert_msg);
23
+ } // namespace native
24
+ } // namespace at
vllm/lib/python3.10/site-packages/torch/include/ATen/ops/_cast_Double_compositeimplicitautograd_dispatch.h ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #pragma once
2
+ // @generated by torchgen/gen.py from DispatchKeyFunction.h
3
+
4
+ // NB: The implementing C++ file is RegisterDispatchKey.cpp
5
+
6
+ // The only #includes we need are for custom classes that have defaults in the C++ API
7
+ #include <c10/core/MemoryFormat.h>
8
+ #include <c10/core/Scalar.h>
9
+ #include <ATen/core/Reduction.h>
10
+
11
+ // Forward declarations of any types needed in the operator signatures.
12
+ // We can't directly include these classes because it will cause circular include dependencies.
13
+ // This file is included by TensorBody.h, which defines the Tensor class.
14
+ #include <ATen/core/ATen_fwd.h>
15
+
16
+ namespace at {
17
+
18
+ namespace compositeimplicitautograd {
19
+
20
+ TORCH_API at::Tensor _cast_Double(const at::Tensor & self, bool non_blocking=false);
21
+
22
+ } // namespace compositeimplicitautograd
23
+ } // namespace at
vllm/lib/python3.10/site-packages/torch/include/ATen/ops/_cast_Short.h ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #pragma once
2
+
3
+ // @generated by torchgen/gen.py from Function.h
4
+
5
+ #include <ATen/Context.h>
6
+ #include <ATen/DeviceGuard.h>
7
+ #include <ATen/TensorUtils.h>
8
+ #include <ATen/TracerMode.h>
9
+ #include <ATen/core/Generator.h>
10
+ #include <ATen/core/Reduction.h>
11
+ #include <ATen/core/Tensor.h>
12
+ #include <c10/core/Scalar.h>
13
+ #include <c10/core/Storage.h>
14
+ #include <c10/core/TensorOptions.h>
15
+ #include <c10/util/Deprecated.h>
16
+ #include <optional>
17
+
18
+
19
+
20
+ #include <ATen/ops/_cast_Short_ops.h>
21
+
22
+ namespace at {
23
+
24
+
25
+ // aten::_cast_Short(Tensor self, bool non_blocking=False) -> Tensor
26
+ inline at::Tensor _cast_Short(const at::Tensor & self, bool non_blocking=false) {
27
+ return at::_ops::_cast_Short::call(self, non_blocking);
28
+ }
29
+
30
+ }
vllm/lib/python3.10/site-packages/torch/include/ATen/ops/_coalesced_meta_dispatch.h ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #pragma once
2
+ // @generated by torchgen/gen.py from DispatchKeyFunction.h
3
+
4
+ // NB: The implementing C++ file is RegisterDispatchKey.cpp
5
+
6
+ // The only #includes we need are for custom classes that have defaults in the C++ API
7
+ #include <c10/core/MemoryFormat.h>
8
+ #include <c10/core/Scalar.h>
9
+ #include <ATen/core/Reduction.h>
10
+
11
+ // Forward declarations of any types needed in the operator signatures.
12
+ // We can't directly include these classes because it will cause circular include dependencies.
13
+ // This file is included by TensorBody.h, which defines the Tensor class.
14
+ #include <ATen/core/ATen_fwd.h>
15
+
16
+ namespace at {
17
+
18
+ namespace meta {
19
+
20
+ TORCH_API at::Tensor & _coalesced_(at::Tensor & self, bool coalesced);
21
+
22
+ } // namespace meta
23
+ } // namespace at
vllm/lib/python3.10/site-packages/torch/include/ATen/ops/_fft_r2c_cpu_dispatch.h ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #pragma once
2
+ // @generated by torchgen/gen.py from DispatchKeyFunction.h
3
+
4
+ // NB: The implementing C++ file is RegisterDispatchKey.cpp
5
+
6
+ // The only #includes we need are for custom classes that have defaults in the C++ API
7
+ #include <c10/core/MemoryFormat.h>
8
+ #include <c10/core/Scalar.h>
9
+ #include <ATen/core/Reduction.h>
10
+
11
+ // Forward declarations of any types needed in the operator signatures.
12
+ // We can't directly include these classes because it will cause circular include dependencies.
13
+ // This file is included by TensorBody.h, which defines the Tensor class.
14
+ #include <ATen/core/ATen_fwd.h>
15
+
16
+ namespace at {
17
+
18
+ namespace cpu {
19
+
20
+ TORCH_API at::Tensor _fft_r2c(const at::Tensor & self, at::IntArrayRef dim, int64_t normalization, bool onesided);
21
+ TORCH_API at::Tensor & _fft_r2c_out(at::Tensor & out, const at::Tensor & self, at::IntArrayRef dim, int64_t normalization, bool onesided);
22
+ TORCH_API at::Tensor & _fft_r2c_outf(const at::Tensor & self, at::IntArrayRef dim, int64_t normalization, bool onesided, at::Tensor & out);
23
+
24
+ } // namespace cpu
25
+ } // namespace at
vllm/lib/python3.10/site-packages/torch/include/ATen/ops/_foreach_zero_cuda_dispatch.h ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #pragma once
2
+ // @generated by torchgen/gen.py from DispatchKeyFunction.h
3
+
4
+ // NB: The implementing C++ file is RegisterDispatchKey.cpp
5
+
6
+ // The only #includes we need are for custom classes that have defaults in the C++ API
7
+ #include <c10/core/MemoryFormat.h>
8
+ #include <c10/core/Scalar.h>
9
+ #include <ATen/core/Reduction.h>
10
+
11
+ // Forward declarations of any types needed in the operator signatures.
12
+ // We can't directly include these classes because it will cause circular include dependencies.
13
+ // This file is included by TensorBody.h, which defines the Tensor class.
14
+ #include <ATen/core/ATen_fwd.h>
15
+
16
+ namespace at {
17
+
18
+ namespace cuda {
19
+
20
+ TORCH_API void _foreach_zero_(at::TensorList self);
21
+
22
+ } // namespace cuda
23
+ } // namespace at
vllm/lib/python3.10/site-packages/torch/include/ATen/ops/_grid_sampler_2d_cpu_fallback_compositeexplicitautograd_dispatch.h ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #pragma once
2
+ // @generated by torchgen/gen.py from DispatchKeyFunction.h
3
+
4
+ // NB: The implementing C++ file is RegisterDispatchKey.cpp
5
+
6
+ // The only #includes we need are for custom classes that have defaults in the C++ API
7
+ #include <c10/core/MemoryFormat.h>
8
+ #include <c10/core/Scalar.h>
9
+ #include <ATen/core/Reduction.h>
10
+
11
+ // Forward declarations of any types needed in the operator signatures.
12
+ // We can't directly include these classes because it will cause circular include dependencies.
13
+ // This file is included by TensorBody.h, which defines the Tensor class.
14
+ #include <ATen/core/ATen_fwd.h>
15
+
16
+ namespace at {
17
+
18
+ namespace compositeexplicitautograd {
19
+
20
+ TORCH_API at::Tensor _grid_sampler_2d_cpu_fallback(const at::Tensor & input, const at::Tensor & grid, int64_t interpolation_mode, int64_t padding_mode, bool align_corners);
21
+ TORCH_API at::Tensor & _grid_sampler_2d_cpu_fallback_out(at::Tensor & out, const at::Tensor & input, const at::Tensor & grid, int64_t interpolation_mode, int64_t padding_mode, bool align_corners);
22
+ TORCH_API at::Tensor & _grid_sampler_2d_cpu_fallback_outf(const at::Tensor & input, const at::Tensor & grid, int64_t interpolation_mode, int64_t padding_mode, bool align_corners, at::Tensor & out);
23
+
24
+ } // namespace compositeexplicitautograd
25
+ } // namespace at
vllm/lib/python3.10/site-packages/torch/include/ATen/ops/_linalg_svd_cpu_dispatch.h ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #pragma once
2
+ // @generated by torchgen/gen.py from DispatchKeyFunction.h
3
+
4
+ // NB: The implementing C++ file is RegisterDispatchKey.cpp
5
+
6
+ // The only #includes we need are for custom classes that have defaults in the C++ API
7
+ #include <c10/core/MemoryFormat.h>
8
+ #include <c10/core/Scalar.h>
9
+ #include <ATen/core/Reduction.h>
10
+
11
+ // Forward declarations of any types needed in the operator signatures.
12
+ // We can't directly include these classes because it will cause circular include dependencies.
13
+ // This file is included by TensorBody.h, which defines the Tensor class.
14
+ #include <ATen/core/ATen_fwd.h>
15
+
16
+ namespace at {
17
+
18
+ namespace cpu {
19
+
20
+ TORCH_API ::std::tuple<at::Tensor,at::Tensor,at::Tensor> _linalg_svd(const at::Tensor & A, bool full_matrices=false, bool compute_uv=true, ::std::optional<c10::string_view> driver=::std::nullopt);
21
+ TORCH_API ::std::tuple<at::Tensor &,at::Tensor &,at::Tensor &> _linalg_svd_out(at::Tensor & U, at::Tensor & S, at::Tensor & Vh, const at::Tensor & A, bool full_matrices=false, bool compute_uv=true, ::std::optional<c10::string_view> driver=::std::nullopt);
22
+ TORCH_API ::std::tuple<at::Tensor &,at::Tensor &,at::Tensor &> _linalg_svd_outf(const at::Tensor & A, bool full_matrices, bool compute_uv, ::std::optional<c10::string_view> driver, at::Tensor & U, at::Tensor & S, at::Tensor & Vh);
23
+
24
+ } // namespace cpu
25
+ } // namespace at
vllm/lib/python3.10/site-packages/torch/include/ATen/ops/_local_scalar_dense_cpu_dispatch.h ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #pragma once
2
+ // @generated by torchgen/gen.py from DispatchKeyFunction.h
3
+
4
+ // NB: The implementing C++ file is RegisterDispatchKey.cpp
5
+
6
+ // The only #includes we need are for custom classes that have defaults in the C++ API
7
+ #include <c10/core/MemoryFormat.h>
8
+ #include <c10/core/Scalar.h>
9
+ #include <ATen/core/Reduction.h>
10
+
11
+ // Forward declarations of any types needed in the operator signatures.
12
+ // We can't directly include these classes because it will cause circular include dependencies.
13
+ // This file is included by TensorBody.h, which defines the Tensor class.
14
+ #include <ATen/core/ATen_fwd.h>
15
+
16
+ namespace at {
17
+
18
+ namespace cpu {
19
+
20
+ TORCH_API at::Scalar _local_scalar_dense(const at::Tensor & self);
21
+
22
+ } // namespace cpu
23
+ } // namespace at
vllm/lib/python3.10/site-packages/torch/include/ATen/ops/_nested_sum_backward_native.h ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #pragma once
2
+
3
+ // @generated by torchgen/gen.py from NativeFunction.h
4
+
5
+ #include <c10/core/Scalar.h>
6
+ #include <c10/core/Storage.h>
7
+ #include <c10/core/TensorOptions.h>
8
+ #include <c10/util/Deprecated.h>
9
+ #include <optional>
10
+ #include <c10/core/QScheme.h>
11
+ #include <ATen/core/Reduction.h>
12
+ #include <ATen/core/Tensor.h>
13
+ #include <tuple>
14
+ #include <vector>
15
+
16
+
17
+ namespace at {
18
+ namespace native {
19
+ TORCH_API at::Tensor _nested_sum_backward_cpu(const at::Tensor & grad, const at::Tensor & self, at::OptionalIntArrayRef dim, bool keepdim=false);
20
+ } // namespace native
21
+ } // namespace at
vllm/lib/python3.10/site-packages/torch/include/ATen/ops/_resize_output_compositeexplicitautograd_dispatch.h ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #pragma once
2
+ // @generated by torchgen/gen.py from DispatchKeyFunction.h
3
+
4
+ // NB: The implementing C++ file is RegisterDispatchKey.cpp
5
+
6
+ // The only #includes we need are for custom classes that have defaults in the C++ API
7
+ #include <c10/core/MemoryFormat.h>
8
+ #include <c10/core/Scalar.h>
9
+ #include <ATen/core/Reduction.h>
10
+
11
+ // Forward declarations of any types needed in the operator signatures.
12
+ // We can't directly include these classes because it will cause circular include dependencies.
13
+ // This file is included by TensorBody.h, which defines the Tensor class.
14
+ #include <ATen/core/ATen_fwd.h>
15
+
16
+ namespace at {
17
+
18
+ namespace compositeexplicitautograd {
19
+
20
+ TORCH_API at::Tensor _resize_output(const at::Tensor & self, at::IntArrayRef size, at::Device device);
21
+ TORCH_API at::Tensor _resize_output_symint(const at::Tensor & self, c10::SymIntArrayRef size, at::Device device);
22
+ TORCH_API const at::Tensor & _resize_output_out(const at::Tensor & out, const at::Tensor & self, at::IntArrayRef size, at::Device device);
23
+ TORCH_API const at::Tensor & _resize_output_outf(const at::Tensor & self, at::IntArrayRef size, at::Device device, const at::Tensor & out);
24
+ TORCH_API const at::Tensor & _resize_output_symint_out(const at::Tensor & out, const at::Tensor & self, c10::SymIntArrayRef size, at::Device device);
25
+ TORCH_API const at::Tensor & _resize_output_symint_outf(const at::Tensor & self, c10::SymIntArrayRef size, at::Device device, const at::Tensor & out);
26
+
27
+ } // namespace compositeexplicitautograd
28
+ } // namespace at
vllm/lib/python3.10/site-packages/torch/include/ATen/ops/_scaled_dot_product_cudnn_attention.h ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #pragma once
2
+
3
+ // @generated by torchgen/gen.py from Function.h
4
+
5
+ #include <ATen/Context.h>
6
+ #include <ATen/DeviceGuard.h>
7
+ #include <ATen/TensorUtils.h>
8
+ #include <ATen/TracerMode.h>
9
+ #include <ATen/core/Generator.h>
10
+ #include <ATen/core/Reduction.h>
11
+ #include <ATen/core/Tensor.h>
12
+ #include <c10/core/Scalar.h>
13
+ #include <c10/core/Storage.h>
14
+ #include <c10/core/TensorOptions.h>
15
+ #include <c10/util/Deprecated.h>
16
+ #include <optional>
17
+
18
+
19
+
20
+ #include <ATen/ops/_scaled_dot_product_cudnn_attention_ops.h>
21
+
22
+ namespace at {
23
+
24
+
25
+ // aten::_scaled_dot_product_cudnn_attention(Tensor query, Tensor key, Tensor value, Tensor? attn_bias, bool compute_log_sumexp, float dropout_p=0.0, bool is_causal=False, bool return_debug_mask=False, *, float? scale=None) -> (Tensor output, Tensor logsumexp, Tensor cum_seq_q, Tensor cum_seq_k, SymInt max_q, SymInt max_k, Tensor philox_seed, Tensor philox_offset, Tensor debug_attn_mask)
26
+ inline ::std::tuple<at::Tensor,at::Tensor,at::Tensor,at::Tensor,c10::SymInt,c10::SymInt,at::Tensor,at::Tensor,at::Tensor> _scaled_dot_product_cudnn_attention(const at::Tensor & query, const at::Tensor & key, const at::Tensor & value, const ::std::optional<at::Tensor> & attn_bias, bool compute_log_sumexp, double dropout_p=0.0, bool is_causal=false, bool return_debug_mask=false, ::std::optional<double> scale=::std::nullopt) {
27
+ return at::_ops::_scaled_dot_product_cudnn_attention::call(query, key, value, attn_bias, compute_log_sumexp, dropout_p, is_causal, return_debug_mask, scale);
28
+ }
29
+
30
+ }
vllm/lib/python3.10/site-packages/torch/include/ATen/ops/_thnn_fused_lstm_cell_ops.h ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #pragma once
2
+
3
+ // @generated by torchgen/gen.py from Operator.h
4
+
5
+ #include <tuple>
6
+ #include <vector>
7
+
8
+ // Forward declarations of any types needed in the operator signatures.
9
+ // We can't directly include these classes because it will cause circular include dependencies.
10
+ // This file is included by TensorBody.h, which defines the Tensor class.
11
+ #include <ATen/core/ATen_fwd.h>
12
+
13
+ namespace at {
14
+ namespace _ops {
15
+
16
+
17
+ struct TORCH_API _thnn_fused_lstm_cell {
18
+ using schema = ::std::tuple<at::Tensor,at::Tensor,at::Tensor> (const at::Tensor &, const at::Tensor &, const at::Tensor &, const ::std::optional<at::Tensor> &, const ::std::optional<at::Tensor> &);
19
+ using ptr_schema = schema*;
20
+ // See Note [static constexpr char* members for windows NVCC]
21
+ STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(name, "aten::_thnn_fused_lstm_cell")
22
+ STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(overload_name, "")
23
+ STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(schema_str, "_thnn_fused_lstm_cell(Tensor input_gates, Tensor hidden_gates, Tensor cx, Tensor? input_bias=None, Tensor? hidden_bias=None) -> (Tensor, Tensor, Tensor)")
24
+ static ::std::tuple<at::Tensor,at::Tensor,at::Tensor> call(const at::Tensor & input_gates, const at::Tensor & hidden_gates, const at::Tensor & cx, const ::std::optional<at::Tensor> & input_bias, const ::std::optional<at::Tensor> & hidden_bias);
25
+ static ::std::tuple<at::Tensor,at::Tensor,at::Tensor> redispatch(c10::DispatchKeySet dispatchKeySet, const at::Tensor & input_gates, const at::Tensor & hidden_gates, const at::Tensor & cx, const ::std::optional<at::Tensor> & input_bias, const ::std::optional<at::Tensor> & hidden_bias);
26
+ };
27
+
28
+ struct TORCH_API _thnn_fused_lstm_cell_out {
29
+ using schema = ::std::tuple<at::Tensor &,at::Tensor &,at::Tensor &> (const at::Tensor &, const at::Tensor &, const at::Tensor &, const ::std::optional<at::Tensor> &, const ::std::optional<at::Tensor> &, at::Tensor &, at::Tensor &, at::Tensor &);
30
+ using ptr_schema = schema*;
31
+ // See Note [static constexpr char* members for windows NVCC]
32
+ STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(name, "aten::_thnn_fused_lstm_cell")
33
+ STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(overload_name, "out")
34
+ STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(schema_str, "_thnn_fused_lstm_cell.out(Tensor input_gates, Tensor hidden_gates, Tensor cx, Tensor? input_bias=None, Tensor? hidden_bias=None, *, Tensor(a!) out0, Tensor(b!) out1, Tensor(c!) out2) -> (Tensor(a!), Tensor(b!), Tensor(c!))")
35
+ static ::std::tuple<at::Tensor &,at::Tensor &,at::Tensor &> call(const at::Tensor & input_gates, const at::Tensor & hidden_gates, const at::Tensor & cx, const ::std::optional<at::Tensor> & input_bias, const ::std::optional<at::Tensor> & hidden_bias, at::Tensor & out0, at::Tensor & out1, at::Tensor & out2);
36
+ static ::std::tuple<at::Tensor &,at::Tensor &,at::Tensor &> redispatch(c10::DispatchKeySet dispatchKeySet, const at::Tensor & input_gates, const at::Tensor & hidden_gates, const at::Tensor & cx, const ::std::optional<at::Tensor> & input_bias, const ::std::optional<at::Tensor> & hidden_bias, at::Tensor & out0, at::Tensor & out1, at::Tensor & out2);
37
+ };
38
+
39
+ }} // namespace at::_ops
vllm/lib/python3.10/site-packages/torch/include/ATen/ops/_upsample_nearest_exact2d_compositeimplicitautograd_dispatch.h ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #pragma once
2
+ // @generated by torchgen/gen.py from DispatchKeyFunction.h
3
+
4
+ // NB: The implementing C++ file is RegisterDispatchKey.cpp
5
+
6
+ // The only #includes we need are for custom classes that have defaults in the C++ API
7
+ #include <c10/core/MemoryFormat.h>
8
+ #include <c10/core/Scalar.h>
9
+ #include <ATen/core/Reduction.h>
10
+
11
+ // Forward declarations of any types needed in the operator signatures.
12
+ // We can't directly include these classes because it will cause circular include dependencies.
13
+ // This file is included by TensorBody.h, which defines the Tensor class.
14
+ #include <ATen/core/ATen_fwd.h>
15
+
16
+ namespace at {
17
+
18
+ namespace compositeimplicitautograd {
19
+
20
+ TORCH_API at::Tensor _upsample_nearest_exact2d(const at::Tensor & input, at::OptionalIntArrayRef output_size, ::std::optional<at::ArrayRef<double>> scale_factors);
21
+ TORCH_API at::Tensor _upsample_nearest_exact2d_symint(const at::Tensor & input, at::OptionalSymIntArrayRef output_size, ::std::optional<at::ArrayRef<double>> scale_factors);
22
+
23
+ } // namespace compositeimplicitautograd
24
+ } // namespace at
vllm/lib/python3.10/site-packages/torch/include/ATen/ops/_validate_sparse_bsc_tensor_args.h ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #pragma once
2
+
3
+ // @generated by torchgen/gen.py from Function.h
4
+
5
+ #include <ATen/Context.h>
6
+ #include <ATen/DeviceGuard.h>
7
+ #include <ATen/TensorUtils.h>
8
+ #include <ATen/TracerMode.h>
9
+ #include <ATen/core/Generator.h>
10
+ #include <ATen/core/Reduction.h>
11
+ #include <ATen/core/Tensor.h>
12
+ #include <c10/core/Scalar.h>
13
+ #include <c10/core/Storage.h>
14
+ #include <c10/core/TensorOptions.h>
15
+ #include <c10/util/Deprecated.h>
16
+ #include <optional>
17
+
18
+
19
+
20
+ #include <ATen/ops/_validate_sparse_bsc_tensor_args_ops.h>
21
+
22
+ namespace at {
23
+
24
+
25
+ // aten::_validate_sparse_bsc_tensor_args(Tensor ccol_indices, Tensor row_indices, Tensor values, int[] size) -> ()
26
+ inline void _validate_sparse_bsc_tensor_args(const at::Tensor & ccol_indices, const at::Tensor & row_indices, const at::Tensor & values, at::IntArrayRef size) {
27
+ return at::_ops::_validate_sparse_bsc_tensor_args::call(ccol_indices, row_indices, values, size);
28
+ }
29
+
30
+ }
vllm/lib/python3.10/site-packages/torch/include/ATen/ops/_validate_sparse_compressed_tensor_args_compositeimplicitautograd_dispatch.h ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #pragma once
2
+ // @generated by torchgen/gen.py from DispatchKeyFunction.h
3
+
4
+ // NB: The implementing C++ file is RegisterDispatchKey.cpp
5
+
6
+ // The only #includes we need are for custom classes that have defaults in the C++ API
7
+ #include <c10/core/MemoryFormat.h>
8
+ #include <c10/core/Scalar.h>
9
+ #include <ATen/core/Reduction.h>
10
+
11
+ // Forward declarations of any types needed in the operator signatures.
12
+ // We can't directly include these classes because it will cause circular include dependencies.
13
+ // This file is included by TensorBody.h, which defines the Tensor class.
14
+ #include <ATen/core/ATen_fwd.h>
15
+
16
+ namespace at {
17
+
18
+ namespace compositeimplicitautograd {
19
+
20
+ TORCH_API void _validate_sparse_compressed_tensor_args(const at::Tensor & compressed_indices, const at::Tensor & plain_indices, const at::Tensor & values, at::IntArrayRef size, at::Layout layout);
21
+
22
+ } // namespace compositeimplicitautograd
23
+ } // namespace at
vllm/lib/python3.10/site-packages/torch/include/ATen/ops/acos_meta.h ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #pragma once
2
+
3
+ // @generated by torchgen/gen.py from NativeMetaFunction.h
4
+
5
+ #include <c10/core/Scalar.h>
6
+ #include <c10/core/Storage.h>
7
+ #include <c10/core/TensorOptions.h>
8
+ #include <c10/util/Deprecated.h>
9
+ #include <optional>
10
+ #include <c10/core/QScheme.h>
11
+ #include <ATen/core/Reduction.h>
12
+ #include <ATen/TensorIterator.h>
13
+ #include <ATen/TensorMeta.h>
14
+ #include <tuple>
15
+ #include <vector>
16
+
17
+ namespace at {
18
+ namespace meta {
19
+
20
+ struct TORCH_API structured_acos : public TensorIteratorBase {
21
+
22
+
23
+ void meta(const at::Tensor & self);
24
+ };
25
+
26
+ } // namespace native
27
+ } // namespace at
vllm/lib/python3.10/site-packages/torch/include/ATen/ops/aminmax_meta.h ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #pragma once
2
+
3
+ // @generated by torchgen/gen.py from NativeMetaFunction.h
4
+
5
+ #include <c10/core/Scalar.h>
6
+ #include <c10/core/Storage.h>
7
+ #include <c10/core/TensorOptions.h>
8
+ #include <c10/util/Deprecated.h>
9
+ #include <optional>
10
+ #include <c10/core/QScheme.h>
11
+ #include <ATen/core/Reduction.h>
12
+ #include <ATen/TensorIterator.h>
13
+ #include <ATen/TensorMeta.h>
14
+ #include <tuple>
15
+ #include <vector>
16
+
17
+ namespace at {
18
+ namespace meta {
19
+
20
+ struct TORCH_API structured_aminmax : public at::impl::MetaBase {
21
+
22
+
23
+ void meta(const at::Tensor & self, ::std::optional<int64_t> dim, bool keepdim);
24
+ };
25
+
26
+ } // namespace native
27
+ } // namespace at
vllm/lib/python3.10/site-packages/torch/include/ATen/ops/angle.h ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #pragma once
2
+
3
+ // @generated by torchgen/gen.py from Function.h
4
+
5
+ #include <ATen/Context.h>
6
+ #include <ATen/DeviceGuard.h>
7
+ #include <ATen/TensorUtils.h>
8
+ #include <ATen/TracerMode.h>
9
+ #include <ATen/core/Generator.h>
10
+ #include <ATen/core/Reduction.h>
11
+ #include <ATen/core/Tensor.h>
12
+ #include <c10/core/Scalar.h>
13
+ #include <c10/core/Storage.h>
14
+ #include <c10/core/TensorOptions.h>
15
+ #include <c10/util/Deprecated.h>
16
+ #include <optional>
17
+
18
+
19
+
20
+ #include <ATen/ops/angle_ops.h>
21
+
22
+ namespace at {
23
+
24
+
25
+ // aten::angle(Tensor self) -> Tensor
26
+ inline at::Tensor angle(const at::Tensor & self) {
27
+ return at::_ops::angle::call(self);
28
+ }
29
+
30
+ // aten::angle.out(Tensor self, *, Tensor(a!) out) -> Tensor(a!)
31
+ inline at::Tensor & angle_out(at::Tensor & out, const at::Tensor & self) {
32
+ return at::_ops::angle_out::call(self, out);
33
+ }
34
+ // aten::angle.out(Tensor self, *, Tensor(a!) out) -> Tensor(a!)
35
+ inline at::Tensor & angle_outf(const at::Tensor & self, at::Tensor & out) {
36
+ return at::_ops::angle_out::call(self, out);
37
+ }
38
+
39
+ }
vllm/lib/python3.10/site-packages/torch/include/ATen/ops/any_native.h ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #pragma once
2
+
3
+ // @generated by torchgen/gen.py from NativeFunction.h
4
+
5
+ #include <c10/core/Scalar.h>
6
+ #include <c10/core/Storage.h>
7
+ #include <c10/core/TensorOptions.h>
8
+ #include <c10/util/Deprecated.h>
9
+ #include <optional>
10
+ #include <c10/core/QScheme.h>
11
+ #include <ATen/core/Reduction.h>
12
+ #include <ATen/core/Tensor.h>
13
+ #include <tuple>
14
+ #include <vector>
15
+ #include <ATen/ops/any_meta.h>
16
+
17
+ namespace at {
18
+ namespace native {
19
+ struct TORCH_API structured_any_out : public at::meta::structured_any_dim {
20
+ void impl(const at::Tensor & self, int64_t dim, bool keepdim, const at::Tensor & out);
21
+ };
22
+ TORCH_API at::Tensor any_dims_default(const at::Tensor & self, at::OptionalIntArrayRef dim=::std::nullopt, bool keepdim=false);
23
+ TORCH_API at::Tensor & any_dims_out_default(const at::Tensor & self, at::OptionalIntArrayRef dim, bool keepdim, at::Tensor & out);
24
+ struct TORCH_API structured_any_dims_out : public at::meta::structured_any_dims {
25
+ void impl(const at::Tensor & self, at::OptionalIntArrayRef dim, bool keepdim, const at::Tensor & out);
26
+ };
27
+ TORCH_API at::Tensor any(const at::Tensor & self, at::Dimname dim, bool keepdim=false);
28
+ TORCH_API at::Tensor & any_out(const at::Tensor & self, at::Dimname dim, bool keepdim, at::Tensor & out);
29
+ struct TORCH_API structured_any_all_out : public at::meta::structured_any {
30
+ void impl(const at::Tensor & self, const at::Tensor & out);
31
+ };
32
+ TORCH_API at::Tensor any_sparse(const at::Tensor & self);
33
+ } // namespace native
34
+ } // namespace at
vllm/lib/python3.10/site-packages/torch/include/ATen/ops/arctan_compositeimplicitautograd_dispatch.h ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #pragma once
2
+ // @generated by torchgen/gen.py from DispatchKeyFunction.h
3
+
4
+ // NB: The implementing C++ file is RegisterDispatchKey.cpp
5
+
6
+ // The only #includes we need are for custom classes that have defaults in the C++ API
7
+ #include <c10/core/MemoryFormat.h>
8
+ #include <c10/core/Scalar.h>
9
+ #include <ATen/core/Reduction.h>
10
+
11
+ // Forward declarations of any types needed in the operator signatures.
12
+ // We can't directly include these classes because it will cause circular include dependencies.
13
+ // This file is included by TensorBody.h, which defines the Tensor class.
14
+ #include <ATen/core/ATen_fwd.h>
15
+
16
+ namespace at {
17
+
18
+ namespace compositeimplicitautograd {
19
+
20
+ TORCH_API at::Tensor arctan(const at::Tensor & self);
21
+ TORCH_API at::Tensor & arctan_out(at::Tensor & out, const at::Tensor & self);
22
+ TORCH_API at::Tensor & arctan_outf(const at::Tensor & self, at::Tensor & out);
23
+ TORCH_API at::Tensor & arctan_(at::Tensor & self);
24
+
25
+ } // namespace compositeimplicitautograd
26
+ } // namespace at
vllm/lib/python3.10/site-packages/torch/include/ATen/ops/avg_pool2d_backward_meta.h ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #pragma once
2
+
3
+ // @generated by torchgen/gen.py from NativeMetaFunction.h
4
+
5
+ #include <c10/core/Scalar.h>
6
+ #include <c10/core/Storage.h>
7
+ #include <c10/core/TensorOptions.h>
8
+ #include <c10/util/Deprecated.h>
9
+ #include <optional>
10
+ #include <c10/core/QScheme.h>
11
+ #include <ATen/core/Reduction.h>
12
+ #include <ATen/TensorIterator.h>
13
+ #include <ATen/TensorMeta.h>
14
+ #include <tuple>
15
+ #include <vector>
16
+
17
+ namespace at {
18
+ namespace meta {
19
+
20
+ struct TORCH_API structured_avg_pool2d_backward : public at::impl::MetaBase {
21
+
22
+
23
+ void meta(const at::Tensor & grad_output, const at::Tensor & self, at::IntArrayRef kernel_size, at::IntArrayRef stride, at::IntArrayRef padding, bool ceil_mode, bool count_include_pad, ::std::optional<int64_t> divisor_override);
24
+ };
25
+
26
+ } // namespace native
27
+ } // namespace at
vllm/lib/python3.10/site-packages/torch/include/ATen/ops/bernoulli_meta_dispatch.h ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #pragma once
2
+ // @generated by torchgen/gen.py from DispatchKeyFunction.h
3
+
4
+ // NB: The implementing C++ file is RegisterDispatchKey.cpp
5
+
6
+ // The only #includes we need are for custom classes that have defaults in the C++ API
7
+ #include <c10/core/MemoryFormat.h>
8
+ #include <c10/core/Scalar.h>
9
+ #include <ATen/core/Reduction.h>
10
+
11
+ // Forward declarations of any types needed in the operator signatures.
12
+ // We can't directly include these classes because it will cause circular include dependencies.
13
+ // This file is included by TensorBody.h, which defines the Tensor class.
14
+ #include <ATen/core/ATen_fwd.h>
15
+
16
+ namespace at {
17
+
18
+ namespace meta {
19
+
20
+ TORCH_API at::Tensor & bernoulli_(at::Tensor & self, const at::Tensor & p, ::std::optional<at::Generator> generator=::std::nullopt);
21
+ TORCH_API at::Tensor & bernoulli_(at::Tensor & self, double p=0.5, ::std::optional<at::Generator> generator=::std::nullopt);
22
+
23
+ } // namespace meta
24
+ } // namespace at
vllm/lib/python3.10/site-packages/torch/include/ATen/ops/blackman_window_native.h ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #pragma once
2
+
3
+ // @generated by torchgen/gen.py from NativeFunction.h
4
+
5
+ #include <c10/core/Scalar.h>
6
+ #include <c10/core/Storage.h>
7
+ #include <c10/core/TensorOptions.h>
8
+ #include <c10/util/Deprecated.h>
9
+ #include <optional>
10
+ #include <c10/core/QScheme.h>
11
+ #include <ATen/core/Reduction.h>
12
+ #include <ATen/core/Tensor.h>
13
+ #include <tuple>
14
+ #include <vector>
15
+
16
+
17
+ namespace at {
18
+ namespace native {
19
+ TORCH_API at::Tensor blackman_window(int64_t window_length, ::std::optional<at::ScalarType> dtype={}, ::std::optional<at::Layout> layout={}, ::std::optional<at::Device> device={}, ::std::optional<bool> pin_memory={});
20
+ TORCH_API at::Tensor & blackman_window_out(int64_t window_length, at::Tensor & out);
21
+ TORCH_API at::Tensor blackman_window(int64_t window_length, bool periodic, ::std::optional<at::ScalarType> dtype={}, ::std::optional<at::Layout> layout={}, ::std::optional<at::Device> device={}, ::std::optional<bool> pin_memory={});
22
+ TORCH_API at::Tensor & blackman_window_periodic_out(int64_t window_length, bool periodic, at::Tensor & out);
23
+ } // namespace native
24
+ } // namespace at
vllm/lib/python3.10/site-packages/torch/include/ATen/ops/block_diag_native.h ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #pragma once
2
+
3
+ // @generated by torchgen/gen.py from NativeFunction.h
4
+
5
+ #include <c10/core/Scalar.h>
6
+ #include <c10/core/Storage.h>
7
+ #include <c10/core/TensorOptions.h>
8
+ #include <c10/util/Deprecated.h>
9
+ #include <optional>
10
+ #include <c10/core/QScheme.h>
11
+ #include <ATen/core/Reduction.h>
12
+ #include <ATen/core/Tensor.h>
13
+ #include <tuple>
14
+ #include <vector>
15
+
16
+
17
+ namespace at {
18
+ namespace native {
19
+ TORCH_API at::Tensor block_diag(at::TensorList tensors);
20
+ TORCH_API at::Tensor & block_diag_out(at::TensorList tensors, at::Tensor & out);
21
+ } // namespace native
22
+ } // namespace at
vllm/lib/python3.10/site-packages/torch/include/ATen/ops/concat_compositeimplicitautograd_dispatch.h ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #pragma once
2
+ // @generated by torchgen/gen.py from DispatchKeyFunction.h
3
+
4
+ // NB: The implementing C++ file is RegisterDispatchKey.cpp
5
+
6
+ // The only #includes we need are for custom classes that have defaults in the C++ API
7
+ #include <c10/core/MemoryFormat.h>
8
+ #include <c10/core/Scalar.h>
9
+ #include <ATen/core/Reduction.h>
10
+
11
+ // Forward declarations of any types needed in the operator signatures.
12
+ // We can't directly include these classes because it will cause circular include dependencies.
13
+ // This file is included by TensorBody.h, which defines the Tensor class.
14
+ #include <ATen/core/ATen_fwd.h>
15
+
16
+ namespace at {
17
+
18
+ namespace compositeimplicitautograd {
19
+
20
+ TORCH_API at::Tensor concat(at::TensorList tensors, int64_t dim=0);
21
+ TORCH_API at::Tensor & concat_out(at::Tensor & out, at::TensorList tensors, int64_t dim=0);
22
+ TORCH_API at::Tensor & concat_outf(at::TensorList tensors, int64_t dim, at::Tensor & out);
23
+ TORCH_API at::Tensor concat(at::TensorList tensors, at::Dimname dim);
24
+ TORCH_API at::Tensor & concat_out(at::Tensor & out, at::TensorList tensors, at::Dimname dim);
25
+ TORCH_API at::Tensor & concat_outf(at::TensorList tensors, at::Dimname dim, at::Tensor & out);
26
+
27
+ } // namespace compositeimplicitautograd
28
+ } // namespace at
vllm/lib/python3.10/site-packages/torch/include/ATen/ops/cudnn_affine_grid_generator_compositeexplicitautograd_dispatch.h ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #pragma once
2
+ // @generated by torchgen/gen.py from DispatchKeyFunction.h
3
+
4
+ // NB: The implementing C++ file is RegisterDispatchKey.cpp
5
+
6
+ // The only #includes we need are for custom classes that have defaults in the C++ API
7
+ #include <c10/core/MemoryFormat.h>
8
+ #include <c10/core/Scalar.h>
9
+ #include <ATen/core/Reduction.h>
10
+
11
+ // Forward declarations of any types needed in the operator signatures.
12
+ // We can't directly include these classes because it will cause circular include dependencies.
13
+ // This file is included by TensorBody.h, which defines the Tensor class.
14
+ #include <ATen/core/ATen_fwd.h>
15
+
16
+ namespace at {
17
+
18
+ namespace compositeexplicitautograd {
19
+
20
+ TORCH_API at::Tensor & cudnn_affine_grid_generator_out(at::Tensor & out, const at::Tensor & theta, int64_t N, int64_t C, int64_t H, int64_t W);
21
+ TORCH_API at::Tensor & cudnn_affine_grid_generator_outf(const at::Tensor & theta, int64_t N, int64_t C, int64_t H, int64_t W, at::Tensor & out);
22
+
23
+ } // namespace compositeexplicitautograd
24
+ } // namespace at
vllm/lib/python3.10/site-packages/torch/include/ATen/ops/cumprod_meta_dispatch.h ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #pragma once
2
+ // @generated by torchgen/gen.py from DispatchKeyFunction.h
3
+
4
+ // NB: The implementing C++ file is RegisterDispatchKey.cpp
5
+
6
+ // The only #includes we need are for custom classes that have defaults in the C++ API
7
+ #include <c10/core/MemoryFormat.h>
8
+ #include <c10/core/Scalar.h>
9
+ #include <ATen/core/Reduction.h>
10
+
11
+ // Forward declarations of any types needed in the operator signatures.
12
+ // We can't directly include these classes because it will cause circular include dependencies.
13
+ // This file is included by TensorBody.h, which defines the Tensor class.
14
+ #include <ATen/core/ATen_fwd.h>
15
+
16
+ namespace at {
17
+
18
+ namespace meta {
19
+
20
+ TORCH_API at::Tensor cumprod(const at::Tensor & self, int64_t dim, ::std::optional<at::ScalarType> dtype=::std::nullopt);
21
+ TORCH_API at::Tensor & cumprod_out(at::Tensor & out, const at::Tensor & self, int64_t dim, ::std::optional<at::ScalarType> dtype=::std::nullopt);
22
+ TORCH_API at::Tensor & cumprod_outf(const at::Tensor & self, int64_t dim, ::std::optional<at::ScalarType> dtype, at::Tensor & out);
23
+ TORCH_API at::Tensor & cumprod_(at::Tensor & self, int64_t dim, ::std::optional<at::ScalarType> dtype=::std::nullopt);
24
+
25
+ } // namespace meta
26
+ } // namespace at
vllm/lib/python3.10/site-packages/torch/include/ATen/ops/det_ops.h ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #pragma once
2
+
3
+ // @generated by torchgen/gen.py from Operator.h
4
+
5
+ #include <tuple>
6
+ #include <vector>
7
+
8
+ // Forward declarations of any types needed in the operator signatures.
9
+ // We can't directly include these classes because it will cause circular include dependencies.
10
+ // This file is included by TensorBody.h, which defines the Tensor class.
11
+ #include <ATen/core/ATen_fwd.h>
12
+
13
+ namespace at {
14
+ namespace _ops {
15
+
16
+
17
+ struct TORCH_API det {
18
+ using schema = at::Tensor (const at::Tensor &);
19
+ using ptr_schema = schema*;
20
+ // See Note [static constexpr char* members for windows NVCC]
21
+ STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(name, "aten::det")
22
+ STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(overload_name, "")
23
+ STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(schema_str, "det(Tensor self) -> Tensor")
24
+ static at::Tensor call(const at::Tensor & self);
25
+ static at::Tensor redispatch(c10::DispatchKeySet dispatchKeySet, const at::Tensor & self);
26
+ };
27
+
28
+ }} // namespace at::_ops
vllm/lib/python3.10/site-packages/torch/include/ATen/ops/diag_embed_native.h ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #pragma once
2
+
3
+ // @generated by torchgen/gen.py from NativeFunction.h
4
+
5
+ #include <c10/core/Scalar.h>
6
+ #include <c10/core/Storage.h>
7
+ #include <c10/core/TensorOptions.h>
8
+ #include <c10/util/Deprecated.h>
9
+ #include <optional>
10
+ #include <c10/core/QScheme.h>
11
+ #include <ATen/core/Reduction.h>
12
+ #include <ATen/core/Tensor.h>
13
+ #include <tuple>
14
+ #include <vector>
15
+
16
+
17
+ namespace at {
18
+ namespace native {
19
+ TORCH_API at::Tensor & diag_embed_out(const at::Tensor & self, int64_t offset, int64_t dim1, int64_t dim2, at::Tensor & out);
20
+ TORCH_API at::Tensor diag_embed(const at::Tensor & self, int64_t offset=0, int64_t dim1=-2, int64_t dim2=-1);
21
+ } // namespace native
22
+ } // namespace at
vllm/lib/python3.10/site-packages/torch/include/ATen/ops/diagonal.h ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #pragma once
2
+
3
+ // @generated by torchgen/gen.py from Function.h
4
+
5
+ #include <ATen/Context.h>
6
+ #include <ATen/DeviceGuard.h>
7
+ #include <ATen/TensorUtils.h>
8
+ #include <ATen/TracerMode.h>
9
+ #include <ATen/core/Generator.h>
10
+ #include <ATen/core/Reduction.h>
11
+ #include <ATen/core/Tensor.h>
12
+ #include <c10/core/Scalar.h>
13
+ #include <c10/core/Storage.h>
14
+ #include <c10/core/TensorOptions.h>
15
+ #include <c10/util/Deprecated.h>
16
+ #include <optional>
17
+
18
+
19
+
20
+ #include <ATen/ops/diagonal_ops.h>
21
+
22
+ namespace at {
23
+
24
+
25
+ // aten::diagonal(Tensor(a) self, int offset=0, int dim1=0, int dim2=1) -> Tensor(a)
26
+ inline at::Tensor diagonal(const at::Tensor & self, int64_t offset=0, int64_t dim1=0, int64_t dim2=1) {
27
+ return at::_ops::diagonal::call(self, offset, dim1, dim2);
28
+ }
29
+
30
+ // aten::diagonal.Dimname(Tensor(a) self, *, Dimname outdim, Dimname dim1, Dimname dim2, int offset=0) -> Tensor(a)
31
+ inline at::Tensor diagonal(const at::Tensor & self, at::Dimname outdim, at::Dimname dim1, at::Dimname dim2, int64_t offset=0) {
32
+ return at::_ops::diagonal_Dimname::call(self, outdim, dim1, dim2, offset);
33
+ }
34
+
35
+ }
vllm/lib/python3.10/site-packages/torch/include/ATen/ops/equal_cpu_dispatch.h ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #pragma once
2
+ // @generated by torchgen/gen.py from DispatchKeyFunction.h
3
+
4
+ // NB: The implementing C++ file is RegisterDispatchKey.cpp
5
+
6
+ // The only #includes we need are for custom classes that have defaults in the C++ API
7
+ #include <c10/core/MemoryFormat.h>
8
+ #include <c10/core/Scalar.h>
9
+ #include <ATen/core/Reduction.h>
10
+
11
+ // Forward declarations of any types needed in the operator signatures.
12
+ // We can't directly include these classes because it will cause circular include dependencies.
13
+ // This file is included by TensorBody.h, which defines the Tensor class.
14
+ #include <ATen/core/ATen_fwd.h>
15
+
16
+ namespace at {
17
+
18
+ namespace cpu {
19
+
20
+ TORCH_API bool equal(const at::Tensor & self, const at::Tensor & other);
21
+
22
+ } // namespace cpu
23
+ } // namespace at
vllm/lib/python3.10/site-packages/torch/include/ATen/ops/erfc_compositeexplicitautogradnonfunctional_dispatch.h ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #pragma once
2
+ // @generated by torchgen/gen.py from DispatchKeyFunction.h
3
+
4
+ // NB: The implementing C++ file is RegisterDispatchKey.cpp
5
+
6
+ // The only #includes we need are for custom classes that have defaults in the C++ API
7
+ #include <c10/core/MemoryFormat.h>
8
+ #include <c10/core/Scalar.h>
9
+ #include <ATen/core/Reduction.h>
10
+
11
+ // Forward declarations of any types needed in the operator signatures.
12
+ // We can't directly include these classes because it will cause circular include dependencies.
13
+ // This file is included by TensorBody.h, which defines the Tensor class.
14
+ #include <ATen/core/ATen_fwd.h>
15
+
16
+ namespace at {
17
+
18
+ namespace compositeexplicitautogradnonfunctional {
19
+
20
+ TORCH_API at::Tensor erfc(const at::Tensor & self);
21
+ TORCH_API at::Tensor & erfc_(at::Tensor & self);
22
+
23
+ } // namespace compositeexplicitautogradnonfunctional
24
+ } // namespace at
vllm/lib/python3.10/site-packages/torch/include/ATen/ops/exp2_meta.h ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #pragma once
2
+
3
+ // @generated by torchgen/gen.py from NativeMetaFunction.h
4
+
5
+ #include <c10/core/Scalar.h>
6
+ #include <c10/core/Storage.h>
7
+ #include <c10/core/TensorOptions.h>
8
+ #include <c10/util/Deprecated.h>
9
+ #include <optional>
10
+ #include <c10/core/QScheme.h>
11
+ #include <ATen/core/Reduction.h>
12
+ #include <ATen/TensorIterator.h>
13
+ #include <ATen/TensorMeta.h>
14
+ #include <tuple>
15
+ #include <vector>
16
+
17
+ namespace at {
18
+ namespace meta {
19
+
20
+ struct TORCH_API structured_exp2 : public TensorIteratorBase {
21
+
22
+
23
+ void meta(const at::Tensor & self);
24
+ };
25
+
26
+ } // namespace native
27
+ } // namespace at
vllm/lib/python3.10/site-packages/torch/include/ATen/ops/fake_quantize_per_channel_affine_cachemask_backward_native.h ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #pragma once
2
+
3
+ // @generated by torchgen/gen.py from NativeFunction.h
4
+
5
+ #include <c10/core/Scalar.h>
6
+ #include <c10/core/Storage.h>
7
+ #include <c10/core/TensorOptions.h>
8
+ #include <c10/util/Deprecated.h>
9
+ #include <optional>
10
+ #include <c10/core/QScheme.h>
11
+ #include <ATen/core/Reduction.h>
12
+ #include <ATen/core/Tensor.h>
13
+ #include <tuple>
14
+ #include <vector>
15
+
16
+
17
+ namespace at {
18
+ namespace native {
19
+ TORCH_API at::Tensor fake_quantize_per_channel_affine_cachemask_backward(const at::Tensor & grad, const at::Tensor & mask);
20
+ } // namespace native
21
+ } // namespace at
vllm/lib/python3.10/site-packages/torch/include/ATen/ops/fake_quantize_per_tensor_affine_cachemask_cpu_dispatch.h ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #pragma once
2
+ // @generated by torchgen/gen.py from DispatchKeyFunction.h
3
+
4
+ // NB: The implementing C++ file is RegisterDispatchKey.cpp
5
+
6
+ // The only #includes we need are for custom classes that have defaults in the C++ API
7
+ #include <c10/core/MemoryFormat.h>
8
+ #include <c10/core/Scalar.h>
9
+ #include <ATen/core/Reduction.h>
10
+
11
+ // Forward declarations of any types needed in the operator signatures.
12
+ // We can't directly include these classes because it will cause circular include dependencies.
13
+ // This file is included by TensorBody.h, which defines the Tensor class.
14
+ #include <ATen/core/ATen_fwd.h>
15
+
16
+ namespace at {
17
+
18
+ namespace cpu {
19
+
20
+ TORCH_API ::std::tuple<at::Tensor,at::Tensor> fake_quantize_per_tensor_affine_cachemask(const at::Tensor & self, double scale, int64_t zero_point, int64_t quant_min, int64_t quant_max);
21
+
22
+ } // namespace cpu
23
+ } // namespace at
vllm/lib/python3.10/site-packages/torch/include/ATen/ops/fbgemm_linear_int8_weight_fp32_activation_compositeimplicitautograd_dispatch.h ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #pragma once
2
+ // @generated by torchgen/gen.py from DispatchKeyFunction.h
3
+
4
+ // NB: The implementing C++ file is RegisterDispatchKey.cpp
5
+
6
+ // The only #includes we need are for custom classes that have defaults in the C++ API
7
+ #include <c10/core/MemoryFormat.h>
8
+ #include <c10/core/Scalar.h>
9
+ #include <ATen/core/Reduction.h>
10
+
11
+ // Forward declarations of any types needed in the operator signatures.
12
+ // We can't directly include these classes because it will cause circular include dependencies.
13
+ // This file is included by TensorBody.h, which defines the Tensor class.
14
+ #include <ATen/core/ATen_fwd.h>
15
+
16
+ namespace at {
17
+
18
+ namespace compositeimplicitautograd {
19
+
20
+ TORCH_API at::Tensor fbgemm_linear_int8_weight_fp32_activation(const at::Tensor & input, const at::Tensor & weight, const at::Tensor & packed, const at::Tensor & col_offsets, const at::Scalar & weight_scale, const at::Scalar & weight_zero_point, const at::Tensor & bias);
21
+
22
+ } // namespace compositeimplicitautograd
23
+ } // namespace at
vllm/lib/python3.10/site-packages/torch/include/ATen/ops/frac_meta.h ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #pragma once
2
+
3
+ // @generated by torchgen/gen.py from NativeMetaFunction.h
4
+
5
+ #include <c10/core/Scalar.h>
6
+ #include <c10/core/Storage.h>
7
+ #include <c10/core/TensorOptions.h>
8
+ #include <c10/util/Deprecated.h>
9
+ #include <optional>
10
+ #include <c10/core/QScheme.h>
11
+ #include <ATen/core/Reduction.h>
12
+ #include <ATen/TensorIterator.h>
13
+ #include <ATen/TensorMeta.h>
14
+ #include <tuple>
15
+ #include <vector>
16
+
17
+ namespace at {
18
+ namespace meta {
19
+
20
+ struct TORCH_API structured_frac : public TensorIteratorBase {
21
+
22
+
23
+ void meta(const at::Tensor & self);
24
+ };
25
+
26
+ } // namespace native
27
+ } // namespace at
vllm/lib/python3.10/site-packages/torch/include/ATen/ops/gcd.h ADDED
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #pragma once
2
+
3
+ // @generated by torchgen/gen.py from Function.h
4
+
5
+ #include <ATen/Context.h>
6
+ #include <ATen/DeviceGuard.h>
7
+ #include <ATen/TensorUtils.h>
8
+ #include <ATen/TracerMode.h>
9
+ #include <ATen/core/Generator.h>
10
+ #include <ATen/core/Reduction.h>
11
+ #include <ATen/core/Tensor.h>
12
+ #include <c10/core/Scalar.h>
13
+ #include <c10/core/Storage.h>
14
+ #include <c10/core/TensorOptions.h>
15
+ #include <c10/util/Deprecated.h>
16
+ #include <optional>
17
+
18
+
19
+
20
+ #include <ATen/ops/gcd_ops.h>
21
+
22
+ namespace at {
23
+
24
+
25
+ // aten::gcd.out(Tensor self, Tensor other, *, Tensor(a!) out) -> Tensor(a!)
26
+ inline at::Tensor & gcd_out(at::Tensor & out, const at::Tensor & self, const at::Tensor & other) {
27
+ return at::_ops::gcd_out::call(self, other, out);
28
+ }
29
+ // aten::gcd.out(Tensor self, Tensor other, *, Tensor(a!) out) -> Tensor(a!)
30
+ inline at::Tensor & gcd_outf(const at::Tensor & self, const at::Tensor & other, at::Tensor & out) {
31
+ return at::_ops::gcd_out::call(self, other, out);
32
+ }
33
+
34
+ // aten::gcd(Tensor self, Tensor other) -> Tensor
35
+ inline at::Tensor gcd(const at::Tensor & self, const at::Tensor & other) {
36
+ return at::_ops::gcd::call(self, other);
37
+ }
38
+
39
+ // aten::gcd_(Tensor(a!) self, Tensor other) -> Tensor(a!)
40
+ inline at::Tensor & gcd_(at::Tensor & self, const at::Tensor & other) {
41
+ return at::_ops::gcd_::call(self, other);
42
+ }
43
+
44
+ }