Skip to content

Commit 82431a3

Browse files
authored
Merge branch 'main' into feat/support-novita-async-t2v
2 parents 7206f68 + 7cd79cd commit 82431a3

File tree

3 files changed

+18
-4
lines changed

3 files changed

+18
-4
lines changed

packages/inference/src/providers/featherless-ai.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import type {
77
import { InferenceOutputError } from "../lib/InferenceOutputError.js";
88
import type { BodyParams } from "../types.js";
99
import { BaseConversationalTask, BaseTextGenerationTask } from "./providerHelper.js";
10+
import { omit } from "../utils/omit.js";
1011

1112
interface FeatherlessAITextCompletionOutput extends Omit<ChatCompletionOutput, "choices"> {
1213
choices: Array<{
@@ -33,9 +34,14 @@ export class FeatherlessAITextGenerationTask extends BaseTextGenerationTask {
3334

3435
override preparePayload(params: BodyParams<TextGenerationInput>): Record<string, unknown> {
3536
return {
36-
...params.args,
37-
...params.args.parameters,
3837
model: params.model,
38+
...omit(params.args, ["inputs", "parameters"]),
39+
...(params.args.parameters
40+
? {
41+
max_tokens: params.args.parameters.max_new_tokens,
42+
...omit(params.args.parameters, "max_new_tokens"),
43+
}
44+
: undefined),
3945
prompt: params.args.inputs,
4046
};
4147
}

packages/tasks-gen/scripts/generate-snippets-fixtures.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ import { existsSync as pathExists } from "node:fs";
1919
import * as fs from "node:fs/promises";
2020
import * as path from "node:path/posix";
2121

22+
import type { InferenceProviderOrPolicy } from "@huggingface/inference";
2223
import { snippets } from "@huggingface/inference";
2324
import type { InferenceSnippet, ModelDataMinimal, SnippetInferenceProvider, WidgetType } from "@huggingface/tasks";
2425
import { inferenceSnippetLanguages } from "@huggingface/tasks";
@@ -31,7 +32,7 @@ const TEST_CASES: {
3132
testName: string;
3233
task: WidgetType;
3334
model: ModelDataMinimal;
34-
providers: SnippetInferenceProvider[];
35+
providers: InferenceProviderOrPolicy[];
3536
lora?: boolean;
3637
opts?: snippets.InferenceSnippetOptions;
3738
}[] = [
@@ -306,7 +307,7 @@ function getFixtureFolder(testName: string): string {
306307
function generateInferenceSnippet(
307308
model: ModelDataMinimal,
308309
language: Language,
309-
provider: SnippetInferenceProvider,
310+
provider: InferenceProviderOrPolicy,
310311
task: WidgetType,
311312
lora: boolean = false,
312313
opts?: Record<string, unknown>

packages/tasks/src/hardware.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,10 @@ export const SKUS = {
100100
tflops: 38.7,
101101
memory: [48],
102102
},
103+
"RTX A5000": {
104+
tflops: 34.1,
105+
memory: [24],
106+
},
103107
"RTX A4000": {
104108
tflops: 19.2,
105109
memory: [16],
@@ -533,6 +537,9 @@ export const SKUS = {
533537
"Intel Core Ultra 7 265KF": {
534538
tflops: 1.53,
535539
},
540+
"Intel Core 14th Generation (i7)": {
541+
tflops: 0.8,
542+
},
536543
"Intel Core 13th Generation (i9)": {
537544
tflops: 0.85,
538545
},

0 commit comments

Comments
 (0)