Not getting response from model

#1
by abhiyanta - opened

I am trying to get the response from this code sample provided:
import torch
from transformers import pipeline

model_id = "CoRover/BharatGPT-3B-Indic"
pipe = pipeline(
"text-generation",
model=model_id,
torch_dtype=torch.bfloat16,
device_map="auto",
use_auth_token=True, # This ensures authentication
)

messages = [
{"role": "system", "content": "You are a helpful assistant who responds in Marathi"},
{"role": "user", "content": "भारत की राजधानी क्या है"},
]
outputs = pipe(messages, max_new_tokens=256)
print(outputs[0]["generated_text"])

But in response i get the error that It looks like the config.json file of CoRover/BharatGPT-3B-Indic does not have a model_type key, or it is not recognized by Hugging Face's pipeline. This means either the model is not correctly uploaded to Hugging Face or it requires a different loading approach.

Error:
ValueError: Unrecognized model in CoRover/BharatGPT-3B-Indic. Should have a model_type key in its config.json, or contain one of the following strings in its name: albert, align, altclip, aria, aria_text, audio-spectrogram-transformer, autoformer, bamba, bark, bart, beit, bert, bert-generation, big_bird, bigbird_pegasus, biogpt, bit, blenderbot, blenderbot-small, blip, blip-2, bloom, bridgetower, bros, camembert, canine, chameleon, chinese_clip, chinese_clip_vision_model, clap, clip, clip_text_model, clip_vision_model, clipseg, clvp, code_llama, codegen, cohere, cohere2, colpali, conditional_detr, convbert, convnext, convnextv2, cpmant, ctrl, cvt, dac, data2vec-audio, data2vec-text, data2vec-vision, dbrx, deberta, deberta-v2, decision_transformer, deformable_detr, deit, depth_anything, deta, detr, diffllama, dinat, dinov2, dinov2_with_registers, distilbert, donut-swin, dpr, dpt, efficientformer, efficientnet, electra, emu3, encodec, encoder-decoder, ernie, ernie_m, esm, falcon, falcon_mamba, fastspeech2_conformer, flaubert, flava, fnet, focalnet, fsmt, funnel, fuyu, gemma, gemma2, git, glm, glpn, gpt-sw3, gpt2, gpt_bigcode, gpt_neo, gpt_neox, gpt_neox_japanese, gptj, gptsan-japanese, granite, granitemoe, graphormer, grounding-dino, groupvit, hiera, hubert, ibert, idefics, idefics2, idefics3, idefics3_vision, ijepa, imagegpt, informer, instructblip, instructblipvideo, jamba, jetmoe, jukebox, kosmos-2, layoutlm, layoutlmv2, layoutlmv3, led, levit, lilt, llama, l...

Your need to confirm your account before you can post a new comment.

Sign up or log in to comment