Skip to content

Commit

Permalink
Add types for MultiModalityCausalLM
Browse files Browse the repository at this point in the history
  • Loading branch information
ocavue committed Dec 7, 2024
1 parent 5710c63 commit d8bef27
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/models.js
Original file line number Diff line number Diff line change
Expand Up @@ -1537,7 +1537,6 @@ export class PreTrainedModel extends Callable {

/**
* Generates sequences of token ids for models with a language modeling head.
// @ts-expect-error TS2306
* @param {import('./generation/parameters.js').GenerationFunctionParameters} options
* @returns {Promise<ModelOutput|Tensor>} The output of the model, which can contain the generated token ids, attentions, and scores.
*/
Expand Down Expand Up @@ -6575,8 +6574,10 @@ export class MultiModalityCausalLM extends MultiModalityPreTrainedModel {
'past_key_values',
];

/**
* @param {ConstructorParameters<typeof MultiModalityPreTrainedModel>} args
*/
constructor(...args) {
// @ts-expect-error TS2556
super(...args);

// State-based approach to switch out which heads to use during generation
Expand Down

0 comments on commit d8bef27

Please sign in to comment.