-
Notifications
You must be signed in to change notification settings - Fork 672
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
Feature: Ollama support #15
Comments
You should be able to configure it to use any api that uses the OpenAI post structure, that being said, this includes OpenRouter, using which I have configured TaskWeaver to use Claude and Llama. But since you'd like to locally host your model you can also use LMStudio, download your desired model or copy it to your models folder, load said model, navigate to the server tab within the application, and start the server. Then in ~/TaskWeaver/project/ edit the taskweaver_configuration.json as such:
alternatively, if you’d like to use Claude(or any of their many available models) with OpenRouter
|
Is there any more detail around this? I am also trying to use TaskWeaver with Orca2 7b via LM Studio, the connection works, but I just get a stream of characters on the server, each line incrementing by one character? Do I need to set custom message formats or prefixes? config.json:
The Post seems to complete:
But then I get the following: Sample output from Server logs, this continues until the context length is reached, then errors out:
|
How would I use the oobabooga backend with this? |
My first thought is to try changing the context length in the "model initialization" settings under server model settings, I tested with OpenHermes 2.5 7B 16k and it worked just fine with the 16k context window. I tried running Orca at 16k and it crashed my poor macbook, so let me try 4096 really quick and get back to you. |
use the --api command flag to start an api server then edit your TaskWeaver_Config.json as such:
not sure though, this is based on a cursory glance at the ooba docs. I would recommend LMStudio as its server is a one click solution, but ooba is fantastic as well. |
Clearly I'm doing something wrong as I get the same behavior with the OpenHermes model as Orca? Are you using a Preset for this model in LM Studio, I am using ChatML, I have also tried setting the server with Automatic Prompt formatting enabled/disabled with/without a Preset - always the same behavior? |
Just sharing in case anyone interested in my setup process
{
"llm.api_base": "http://localhost:1234/v1",
"llm.api_key": "0",
"llm.model": "local-model"
}
At least Task Weaver works with calling the local LLM, however no success on forecasting stocks or the like. I suspect the selected model is not good enough 😄 |
I am using a 2020 MacBook Pro with the M1 Pro SOC and 16GB ram. |
Thanks for sharing this - I tried prompting task weaver to do this:
However, it seems the LLM is not able to construct code that can fetch the data from a website that is not using an API key of some sorts. @Kaden-Schutt were you able to successfully complete this kind of task? Or what tasks did you have success with? |
It has to be a windows issue, I followed your instructions (THANK YOU!). But still get the same result, the POST completes, but then just line after repeated line in the server logs...i've been running the first prompt for several mins and its just printing \n` over and over....:
It never completes... each iteration its adding another new line chr... But once more, I really appreciate all the assistance! |
Yeah after further testing it seems hermes is not the best model for this, I tried doing more complex stuff and it started hallucinating like you mentioned. Try |
@benjamin-mogensen
|
Thanks, ill try this on booga, for some odd reason i tried lm studio out with the exact set up you said, and it gives me this error: Never mind, actually lm studio is working although i did want to use exllama with booga, i used the config you used for deepseek Update: I tried on oobabooga and got this with the config you recommended: ''' During handling of the above exception, another exception occurred: Traceback (most recent call last): Human: |
Thanks, will try that. I thought the code generated by Task Weaver would automatically install any dependencies needed. Its a bit difficult if its not able to do that I think :) |
After further testing it seems that the only local model that works seamlessly with TaskWeaver is deepseek coder, minstrel models try but they quickly and easily lose the plot, and llama are completely incompatible from my testing, which has been limited to 7b and 13b models due to hardware constraints. I would love to know if anyone can get anything coherent from a larger model like deepseek coder 33b, I am going to test codellama through openrouter now and report back with the results. |
Did you get this error ever, it happens every second response from the model. (lm studio) "
File "C:\Users\PC\Documents\TaskWeaver\taskweaver\session\session.py", line 124, in send_message Human:" |
I am download deep seek 33b now, not sure if I can get it to run. I have not been able to get any tasks to complete with any models, not even deep seek 7b. Do you have an example of a task prompt that you got to work? |
Followup on this - I am on a M1 Mac Studio and I can load the 33b but it takes forever to get a reply from a simple prompt so not feasible to use for me 😄 |
I had success with local llm model taskweaver_config.json Model loaded with Just gave it a simple task to create a python hello_world and store in the working directory |
@MrDelusionAI can you share the exact prompt? I want to try and see if I can get it to work also |
@benjamin-mogensen it was having issues with the file directory after my initial prompt, I followed up my prompts with asking it to tell me what was the current working directory, it printed the working directory, then prompted it again to |
Thanks @MrDelusionAI ! That seemed to work. Had to increase n_ctx to 8192. Prompt: create a simple python hello world program and save it in the current working directory Last message from TaskWeaver: TaskWeaver: The Python code 'print("Hello, World!")' has been written and saved as hello_world.py File was saved inside /project/workspace/sessions and then under some date and numbered folder. |
Yes I believe the context length for the deepseeker model is 16384. Should have mentioned that previously. |
Thanks! I couldn't find that anywhere :) |
In case anyone wants my ML Studio model config for Deepseeker: |
Thank you everyone for all the contributions and comments. It's actually started as a sad day, but I've seen those just a few minutes ago. You made me smile:) |
Hello friends, I am pleased to announce that Orca-V2, CodeLLama, and of course deepseek coder are working using Ooba text-generation UI.
|
As an alternative to text-geneartion-webui, try litellm |
Set llm.response_format to "text" instead of null and it may work better |
@Kaden-Schutt, why does it only work it llama cpp backend for api hosting for taskweaver? I tried trandformers and it fail |
Ollama is now supported in TaskWeaver, please follow the docs for more information. |
I followed the instruction, but I can't work through, seems Ollama endpoint can't be accessed by TaskWeaver, reports the error message: TaskWeaver ▶ I am TaskWeaver, an AI assistant. To get started, could you please enter your request? |
Hello and thanks for this great repository.
It would be so nice to have self hosted LLM support, especially with Olllama.
Do you have plans for such integration?
Best,
Orkut
The text was updated successfully, but these errors were encountered: