Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting missing positional argument error with TogetherAI model #1078

Open
Alterex1 opened this issue Nov 16, 2024 · 0 comments
Open

Getting missing positional argument error with TogetherAI model #1078

Alterex1 opened this issue Nov 16, 2024 · 0 comments

Comments

@Alterex1
Copy link

The bug
When trying to use the TogetherAI model I receive the following error:

  File "C:\Users\kille\AppData\Local\Programs\Python\Python312\Lib\site-packages\guidance\models\_togetherai.py", line 27, in __init__
    tokenizer = TransformersTokenizer(
TypeError: TransformersTokenizer.__init__() missing 1 required positional argument: 'transformers_tokenizer'

It seems that it's an issue within the TogetherAI class. I checked where in the code it calls TransformersTokenizer and it does not use transformers_tokenizer as a parameter. It instead uses tokenizer which could be the cause of the error but I'm not so sure.

To Reproduce

import os
from dotenv import load_dotenv
from guidance import models
from transformers import AutoTokenizer

load_dotenv()

TOGETHER_AI = os.getenv('TOGETHER_AI_API')

token = AutoTokenizer.from_pretrained("meta-llama/Llama-3.2-11B-Vision-Instruct")

temp = models.TogetherAI(model="meta-llama/Llama-Vision-Free", api_key=TOGETHER_AI, tokenizer=token)

System info (please complete the following information):

  • OS: Windows 11
  • Guidance Version: 0.1.16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant