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

Llama 3.1 Code Interpreter file reference #610

Open
jonatananselmo opened this issue Jul 25, 2024 · 6 comments
Open

Llama 3.1 Code Interpreter file reference #610

jonatananselmo opened this issue Jul 25, 2024 · 6 comments
Assignees
Labels
enhancement New feature or request

Comments

@jonatananselmo
Copy link

I have searched in “Model Cards and Prompt Formats” and in the Github repositories about what is the correct way to reference a file in the prompt to be used by the code interpreter but I have not found an example.
In the paper, they only mention a few examples where they do it in the following way:
file_path = “path/to/file”.
But I'm not sure if this is the right way as sometimes it doesn't work and it gets worse when the language is not English.
In the repository “llama-agentic-system” there are some examples about using files, but the code has too many layers and I couldn't get to the prompt that is sent to the model.
I double checked that the code interpreter tool was enabled by the line “Environment: ipython” at the system prompt.
I also tried enabling the brave_search and wolfram_alpha tools, but the result is the same.
Here is the prompt I'm trying:

<|begin_of_text|><|start_header_id|>system<|end_header_id|>

Environment: ipython
Tools: brave_search, wolfram_alpha

Cutting Knowledge Date: December 2023
Today Date: 25 July 2024

You are a helpful assistant.<|eot_id|><|start_header_id|>user<|end_header_id|>

Give me a summary

file_path = "./document.docx"<|eot_id|><|start_header_id|>assistant<|end_header_id|>


Playing with the temperature parameter, sometimes the model responds with the <|python_tag|> token but sometimes not.
I am using Llama 3.1 - 70B - fp8 by NeuralMagic

@init27 init27 self-assigned this Aug 19, 2024
@init27
Copy link
Contributor

init27 commented Aug 19, 2024

Hey @jonatananselmo thanks for the feedback and Q!

I will updating the repo with some example references on how to apply function calling along with tutorials, I will let you know once they are updated.

@init27 init27 added the enhancement New feature or request label Aug 20, 2024
@jonatananselmo
Copy link
Author

Great @init27, an example using a file reference should be helpful!

@animeshj9
Copy link

Commenting to get notifications.

@liu-zhy
Copy link

liu-zhy commented Sep 18, 2024

@init27 Great! May I ask when it will be updated?

@init27
Copy link
Contributor

init27 commented Sep 30, 2024

@liu-zhy Here is an example-let me know if you have any Qs!

@liu-zhy
Copy link

liu-zhy commented Sep 30, 2024

@init27 Thanks, but I still want to know how to operate on files when using Code Interpreter? For example, give a csv file, I want call Code Interpreter to visualize this csv file. How can I pass the file path to Code Interpreter?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants