@huggingface/tasks 0.22.2 → 0.22.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. package/dist/commonjs/agent-harnesses.d.ts +123 -4
  2. package/dist/commonjs/agent-harnesses.d.ts.map +1 -1
  3. package/dist/commonjs/agent-harnesses.js +86 -5
  4. package/dist/commonjs/gguf.d.ts +3 -1
  5. package/dist/commonjs/gguf.d.ts.map +1 -1
  6. package/dist/commonjs/gguf.js +3 -0
  7. package/dist/commonjs/hardware-amd.d.ts.map +1 -1
  8. package/dist/commonjs/hardware-amd.js +26 -1
  9. package/dist/commonjs/hardware-nvidia.d.ts.map +1 -1
  10. package/dist/commonjs/hardware-nvidia.js +44 -2
  11. package/dist/commonjs/hardware.d.ts +36 -2
  12. package/dist/commonjs/hardware.d.ts.map +1 -1
  13. package/dist/commonjs/hardware.js +35 -2
  14. package/dist/commonjs/model-libraries-snippets.d.ts +2 -0
  15. package/dist/commonjs/model-libraries-snippets.d.ts.map +1 -1
  16. package/dist/commonjs/model-libraries-snippets.js +51 -3
  17. package/dist/commonjs/model-libraries.d.ts +23 -1
  18. package/dist/commonjs/model-libraries.d.ts.map +1 -1
  19. package/dist/commonjs/model-libraries.js +24 -0
  20. package/dist/esm/agent-harnesses.d.ts +123 -4
  21. package/dist/esm/agent-harnesses.d.ts.map +1 -1
  22. package/dist/esm/agent-harnesses.js +86 -5
  23. package/dist/esm/gguf.d.ts +3 -1
  24. package/dist/esm/gguf.d.ts.map +1 -1
  25. package/dist/esm/gguf.js +3 -0
  26. package/dist/esm/hardware-amd.d.ts.map +1 -1
  27. package/dist/esm/hardware-amd.js +26 -1
  28. package/dist/esm/hardware-nvidia.d.ts.map +1 -1
  29. package/dist/esm/hardware-nvidia.js +44 -2
  30. package/dist/esm/hardware.d.ts +36 -2
  31. package/dist/esm/hardware.d.ts.map +1 -1
  32. package/dist/esm/hardware.js +35 -2
  33. package/dist/esm/model-libraries-snippets.d.ts +2 -0
  34. package/dist/esm/model-libraries-snippets.d.ts.map +1 -1
  35. package/dist/esm/model-libraries-snippets.js +46 -0
  36. package/dist/esm/model-libraries.d.ts +23 -1
  37. package/dist/esm/model-libraries.d.ts.map +1 -1
  38. package/dist/esm/model-libraries.js +24 -0
  39. package/package.json +1 -1
  40. package/src/agent-harnesses.ts +96 -5
  41. package/src/gguf.ts +3 -0
  42. package/src/hardware-amd.ts +26 -1
  43. package/src/hardware-nvidia.ts +44 -2
  44. package/src/hardware.ts +38 -4
  45. package/src/model-libraries-snippets.ts +48 -0
  46. package/src/model-libraries.ts +24 -0
package/src/hardware.ts CHANGED
@@ -38,8 +38,9 @@ export interface HardwareSpec {
38
38
  * sold via OEMs without a public MSRP (H100, MI300X, ...), this is a
39
39
  * widely-reported street price. For mobile/laptop GPUs that are not sold
40
40
  * standalone, this is the approximate module/BOM cost. For Apple Silicon
41
- * SoCs, this is the price of a Mac configured with that chip and the
42
- * largest memory option. For CPU "family" entries (e.g. "Xeon 4th Gen",
41
+ * and NVIDIA GB10/RTX Spark SoCs, this is the price of a representative
42
+ * system configured with that chip and the largest memory option.
43
+ * For CPU "family" entries (e.g. "Xeon 4th Gen",
43
44
  * "Ryzen Zen 4 7000 (Ryzen 9)"), this is the tray/box price of a
44
45
  * representative flagship SKU at launch.
45
46
  */
@@ -223,12 +224,33 @@ export const SKUS = {
223
224
  power: 250,
224
225
  releaseYear: 2024,
225
226
  },
227
+ "Intel Core 14th Generation (i9)": {
228
+ tflops: 0.85,
229
+ msrp: 589,
230
+ power: 253,
231
+ releaseYear: 2023,
232
+ aliases: ["i9-14900K", "i9-14900KF", "i9-14900"],
233
+ },
226
234
  "Intel Core 14th Generation (i7)": {
227
235
  tflops: 0.8,
228
236
  msrp: 400,
229
237
  power: 253,
230
238
  releaseYear: 2023,
231
239
  },
240
+ "Intel Core 14th Generation (i5)": {
241
+ tflops: 0.79,
242
+ msrp: 319,
243
+ power: 181,
244
+ releaseYear: 2023,
245
+ aliases: ["i5-14600K", "i5-14600KF", "i5-14400"],
246
+ },
247
+ "Intel Core 14th Generation (i3)": {
248
+ tflops: 0.58,
249
+ msrp: 134,
250
+ power: 110,
251
+ releaseYear: 2024,
252
+ aliases: ["i3-14100", "i3-14100F"],
253
+ },
232
254
  "Intel Core 13th Generation (i9)": {
233
255
  tflops: 0.85,
234
256
  msrp: 600,
@@ -325,6 +347,18 @@ export const SKUS = {
325
347
  power: 90,
326
348
  releaseYear: 2020,
327
349
  },
350
+ "Intel Celeron G3930": {
351
+ tflops: 0.046,
352
+ msrp: 42,
353
+ power: 51,
354
+ releaseYear: 2017,
355
+ },
356
+ "Intel Core i5-3230M": {
357
+ tflops: 0.083,
358
+ msrp: 225,
359
+ power: 35,
360
+ releaseYear: 2013,
361
+ },
328
362
  },
329
363
  AMD: {
330
364
  "EPYC 5th Generation Zen 5 (Turin)": {
@@ -634,8 +668,8 @@ export const SKUS = {
634
668
  },
635
669
  "Apple M5 Ultra": {
636
670
  tflops: 45.6,
637
- memory: [96, 256],
638
- msrp: 10_799,
671
+ memory: [96, 256, 512],
672
+ msrp: 22_299,
639
673
  power: 220,
640
674
  releaseYear: 2026,
641
675
  },
@@ -143,6 +143,20 @@ export const bm25s = (model: ModelData): string[] => [
143
143
  retriever = BM25HF.load_from_hub("${model.id}")`,
144
144
  ];
145
145
 
146
+ export const case_model = (): string[] => [
147
+ `pip install git+https://github.com/SAP-samples/case`,
148
+ `import pandas as pd
149
+ from case.embedding import CaseTransformer
150
+ X = pd.DataFrame({
151
+ "job": ["Junior Data Scientist", "Senior Data Scientist", "Engineering Manager", "Product Executive"],
152
+ "years_experience": [1.5, 10.0, 12.0, 14.0],
153
+ })
154
+ y = pd.Series([72000, 130000, 165000, 210000], name="income")
155
+ case_embedder = CaseTransformer()
156
+ X_enhanced = case_embedder.fit_transform(X, y)
157
+ # X_enhanced can now be fed to any tabular learner (e.g. TabICL)`,
158
+ ];
159
+
146
160
  export const chatterbox = (): string[] => [
147
161
  `# pip install chatterbox-tts
148
162
  import torchaudio as ta
@@ -1848,6 +1862,40 @@ image_prompt = Image.open("path/to/image.jpg").convert("RGB")
1848
1862
  video = wan_i2v.generate(text_prompt, image_prompt)`,
1849
1863
  ];
1850
1864
 
1865
+ export const pika_h3_flex = (model: ModelData): string[] => [
1866
+ `# pip install -r examples/requirements-diffusers.txt (see the examples/ folder of this repo)
1867
+ import torch
1868
+ from diffusers import ComponentsManager, ModularPipeline
1869
+ from diffusers.utils.export_utils import encode_video
1870
+ from PIL import Image
1871
+
1872
+ workflow = "fl2va" # "fl2va" (first-frame to video+audio) or "ref2va" (reference images/video to video+audio)
1873
+
1874
+ manager = ComponentsManager()
1875
+ manager.enable_auto_cpu_offload(device="cuda:0")
1876
+ pipe = ModularPipeline.from_pretrained("${model.id}", workflow=workflow, components_manager=manager)
1877
+ pipe.load_components(
1878
+ pretrained_model_name_or_path="${model.id}",
1879
+ dtype={"vae": torch.float32, "audio_vae": torch.float32, "default": torch.bfloat16},
1880
+ )
1881
+ # The bundled base components are not Pika-adapted weights: load the matching adapter.
1882
+ pipe.load_lora_weights("${model.id}", weight_name=f"{workflow}/adapter.safetensors")
1883
+
1884
+ result = pipe(
1885
+ prompt="A cat walks through a sunlit cafe and jumps onto the counter",
1886
+ image=Image.open("first_frame.png").convert("RGB"),
1887
+ height=480,
1888
+ width=832,
1889
+ num_frames=121,
1890
+ generator=torch.Generator("cuda:0").manual_seed(0),
1891
+ output=["videos", "audio", "sampling_rate"],
1892
+ )
1893
+ encode_video(
1894
+ result["videos"][0], fps=24, output_path="output.mp4",
1895
+ audio=result["audio"][0].float().cpu(), audio_sample_rate=result["sampling_rate"],
1896
+ )`,
1897
+ ];
1898
+
1851
1899
  export const pocket_tts = (model: ModelData): string[] => [
1852
1900
  `from pocket_tts import TTSModel
1853
1901
  import scipy.io.wavfile
@@ -956,6 +956,13 @@ export const MODEL_LIBRARIES_UI_ELEMENTS = {
956
956
  filter: false,
957
957
  countDownloads: `path_extension:"pth" OR path:"config.json"`,
958
958
  },
959
+ "limx-dynamics": {
960
+ prettyLabel: "LimX Dynamics",
961
+ repoName: "LimX Dynamics",
962
+ repoUrl: "https://github.com/limxdynamics/limxdynamics",
963
+ filter: false,
964
+ countDownloads: `(path_filename:"params" AND path_extension:"yaml") OR (path_filename:"controllers" AND path_extension:"yaml") OR (path_filename:"norm_stats" AND path_extension:"json")`,
965
+ },
959
966
  liveportrait: {
960
967
  prettyLabel: "LivePortrait",
961
968
  repoName: "LivePortrait",
@@ -1297,6 +1304,17 @@ export const MODEL_LIBRARIES_UI_ELEMENTS = {
1297
1304
  filter: false,
1298
1305
  countDownloads: `path_extension:"pth"`,
1299
1306
  },
1307
+ "pika-h3-flex": {
1308
+ prettyLabel: "Pika H3 Flex",
1309
+ repoName: "Pika-H3-Flex",
1310
+ repoUrl: "https://github.com/Pika-Labs/Pika-H3-Flex",
1311
+ docsUrl: "https://huggingface.co/docs/diffusers/main/en/api/pipelines/pika_h3_flex",
1312
+ snippets: snippets.pika_h3_flex,
1313
+ filter: false,
1314
+ /// Diffusers modular pipeline loads (index files) plus the Pika adapters, which live in
1315
+ /// subfolders (fl2va/, ref2va/, comfy/loras/) that the diffusers rule does not count.
1316
+ countDownloads: `path:"modular_model_index.json" OR path:"model_index.json" OR path:"fl2va/adapter.safetensors" OR path:"ref2va/adapter.safetensors" OR (path_prefix:"comfy/loras/" AND path_extension:"safetensors")`,
1317
+ },
1300
1318
  piper: {
1301
1319
  prettyLabel: "Piper",
1302
1320
  repoName: "Piper",
@@ -1494,6 +1512,12 @@ export const MODEL_LIBRARIES_UI_ELEMENTS = {
1494
1512
  filter: true,
1495
1513
  countDownloads: `path:"cfg.json"`,
1496
1514
  },
1515
+ "sap-case": {
1516
+ prettyLabel: "CASE",
1517
+ repoName: "CASE",
1518
+ repoUrl: "https://github.com/SAP-samples/case",
1519
+ snippets: snippets.case_model,
1520
+ },
1497
1521
  "sap-rpt-1-oss": {
1498
1522
  prettyLabel: "sap-rpt-1-oss",
1499
1523
  repoName: "sap-rpt-1-oss",