0
$\begingroup$

In this tutorial, when specifying

llm = HuggingFaceHub(
    repo_id=repo_id, model_kwargs={"temperature": 0.5, "max_length": 64}) 

only repository id is mentioned, without referring to the task that is to be performed (for instance summarization or text generation). However, one may specify something like

dotaks = transformers.pipeline(
    model=repo_id, 
    tokenizer=tokenizer,
    task='text-generation',
    return_full_text=True,
    temperature=0.5,
    max_new_tokens=124,)

If I try to remove the task it would not work. What is the difference among the above two approaches? How will the top code decide on the appropriate task if not specified?

$\endgroup$

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.