Skip to content

Commit 3f56fae

Browse files
Merge branch 'main' into update-request-func
2 parents 68fda16 + e94fd2f commit 3f56fae

File tree

8 files changed

+58
-3
lines changed

8 files changed

+58
-3
lines changed

CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Ownership for the Inference Package
22

3-
/packages/inference/ @julien-c @hanouticelina @SBrandeis @coyotte508
3+
/packages/inference/ @julien-c @hanouticelina @SBrandeis
44

55
# Ownership for the Tasks Package
66

packages/hub/src/lib/file-download-info.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ describe("fileDownloadInfo", () => {
1313
});
1414

1515
assert.strictEqual(info?.size, 536063208);
16-
assert.strictEqual(info?.etag, '"41a0e56472bad33498744818c8b1ef2c-64"');
16+
assert.strictEqual(info?.etag, '"879c5715c18a0b7f051dd33f70f0a5c8dd1522e0a43f6f75520f16167f29279b"');
1717
assert(info?.downloadLink);
1818
});
1919

packages/hub/src/lib/list-files.spec.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ describe("listFiles", () => {
3737
size: 440473133,
3838
pointerSize: 134,
3939
},
40+
xetHash: "2d8408d3a894d02517d04956e2f7546ff08362594072f3527ce144b5212a3296",
4041
oid: "ba5d19791be1dd7992e33bd61f20207b0f7f50a5",
4142
path: "pytorch_model.bin",
4243
size: 440473133,
@@ -48,6 +49,7 @@ describe("listFiles", () => {
4849
size: 536063208,
4950
pointerSize: 134,
5051
},
52+
xetHash: "879c5715c18a0b7f051dd33f70f0a5c8dd1522e0a43f6f75520f16167f29279b",
5153
oid: "9eb98c817f04b051b3bcca591bcd4e03cec88018",
5254
path: "tf_model.h5",
5355
size: 536063208,
@@ -113,6 +115,7 @@ describe("listFiles", () => {
113115
size: 440473133,
114116
pointerSize: 134,
115117
},
118+
xetHash: "2d8408d3a894d02517d04956e2f7546ff08362594072f3527ce144b5212a3296",
116119
oid: "ba5d19791be1dd7992e33bd61f20207b0f7f50a5",
117120
path: "pytorch_model.bin",
118121
size: 440473133,
@@ -129,6 +132,7 @@ describe("listFiles", () => {
129132
size: 536063208,
130133
pointerSize: 134,
131134
},
135+
xetHash: "879c5715c18a0b7f051dd33f70f0a5c8dd1522e0a43f6f75520f16167f29279b",
132136
oid: "9eb98c817f04b051b3bcca591bcd4e03cec88018",
133137
path: "tf_model.h5",
134138
size: 536063208,

packages/hub/src/lib/list-files.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ export interface ListFileEntry {
1717
/** Size of the raw pointer file, 100~200 bytes */
1818
pointerSize: number;
1919
};
20+
/**
21+
* Xet-backed hash, a new protocol replacing LFS for big files.
22+
*/
23+
xetHash?: string;
2024
/**
2125
* Only fetched if `expand` is set to `true` in the `listFiles` call.
2226
*/

packages/tasks/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@huggingface/tasks",
33
"packageManager": "[email protected]",
4-
"version": "0.18.4",
4+
"version": "0.18.5",
55
"description": "List of ML tasks for huggingface.co/tasks",
66
"repository": "https://github.com/huggingface/huggingface.js.git",
77
"publishConfig": {

packages/tasks/src/hardware.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,14 @@ export const SKUS = {
6060
tflops: 30.29,
6161
memory: [24],
6262
},
63+
"RTX PRO 6000 WS": {
64+
tflops: 126,
65+
memory: [96],
66+
},
67+
"RTX PRO 6000 Max-Q": {
68+
tflops: 116,
69+
memory: [96],
70+
},
6371
"RTX 6000 Ada": {
6472
tflops: 91.1,
6573
memory: [48],

packages/tasks/src/model-libraries-snippets.ts

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -550,6 +550,39 @@ export const keras_hub = (model: ModelData): string[] => {
550550
return snippets;
551551
};
552552

553+
export const lightning_ir = (model: ModelData): string[] => {
554+
if (model.tags.includes("bi-encoder")) {
555+
return [
556+
`#install from https://github.com/webis-de/lightning-ir
557+
558+
from lightning_ir import BiEncoderModule
559+
model = BiEncoderModule("${model.id}")
560+
561+
model.score("query", ["doc1", "doc2", "doc3"])`,
562+
];
563+
} else if (model.tags.includes("cross-encoder")) {
564+
return [
565+
`#install from https://github.com/webis-de/lightning-ir
566+
567+
from lightning_ir import CrossEncoderModule
568+
model = CrossEncoderModule("${model.id}")
569+
570+
model.score("query", ["doc1", "doc2", "doc3"])`,
571+
];
572+
}
573+
return [
574+
`#install from https://github.com/webis-de/lightning-ir
575+
576+
from lightning_ir import BiEncoderModule, CrossEncoderModule
577+
578+
# depending on the model type, use either BiEncoderModule or CrossEncoderModule
579+
model = BiEncoderModule("${model.id}")
580+
# model = CrossEncoderModule("${model.id}")
581+
582+
model.score("query", ["doc1", "doc2", "doc3"])`,
583+
];
584+
};
585+
553586
export const llama_cpp_python = (model: ModelData): string[] => {
554587
const snippets = [
555588
`from llama_cpp import Llama

packages/tasks/src/model-libraries.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -444,6 +444,12 @@ export const MODEL_LIBRARIES_UI_ELEMENTS = {
444444
repoName: "k2",
445445
repoUrl: "https://github.com/k2-fsa/k2",
446446
},
447+
"lightning-ir": {
448+
prettyLabel: "Lightning IR",
449+
repoName: "Lightning IR",
450+
repoUrl: "https://github.com/webis-de/lightning-ir",
451+
snippets: snippets.lightning_ir,
452+
},
447453
liveportrait: {
448454
prettyLabel: "LivePortrait",
449455
repoName: "LivePortrait",

0 commit comments

Comments
 (0)