langchain integration
#33
by
mdeniz1
- opened
hi,
I'd like to use the model with langchain. but I can not find its task. It does not have a declared task in the model card.
So how can I use it?
here is how langchain integrates with huggingface
from langchain_huggingface import HuggingFaceEndpoint
from langchain_huggingface import HuggingFacePipeline
llm = HuggingFacePipeline.from_model_id(
model_id="THUDM/glm-4v-9b",
task="text-generation",
pipeline_kwargs=dict(
max_new_tokens=512,
do_sample=False,
repetition_penalty=1.03,
),
)
so what should I write the task? and it is a required parameter.