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

Add support for tabAutocompleteModel remotely #1215

Closed
3 tasks done
xndpxs opened this issue May 1, 2024 · 5 comments
Closed
3 tasks done

Add support for tabAutocompleteModel remotely #1215

xndpxs opened this issue May 1, 2024 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@xndpxs
Copy link

xndpxs commented May 1, 2024

Before submitting your bug report

Relevant environment info

- OS:EndeavourOS
- Continue:0.9.123
- IDE:VSCodium

Description

Hi all, my Llama3 is working flawlessly on LAN.
The problem is that I need starcoder2 for the tabAutoCompleteModel Option.
I can see both models with ollama list:

ollama list
NAME                    ID              SIZE        MODIFIED     
llama3:latest           a6990ed6be41    4.7 GB      5 hours ago
starcoder2:latest       f67ae0f64584    1.7 GB      2 hours ago

Continue is working with llama3 remotely, but I can't seem to be able to configure tabAutoCompleteModel in Continue with starcoder2 from the same server, I am getting this error:
The model 'starcoder2' was not found
But In fact as you can see it is running.

To reproduce

I am configuring

  "tabAutocompleteModel": {
    "title": "Starcoder2",
    "provider": "ollama",    
    "model": "starcoder2",
    "apiBase": "http://ip:port"

Log output

http://ip:port/api/generate The model "starcoder2" was not found. To download it, run `ollama run starcoder2`.
@xndpxs xndpxs added the bug Something isn't working label May 1, 2024
@sestinj
Copy link
Contributor

sestinj commented May 2, 2024

@xndpxs this is a consequence of how Ollama manages models—they won't always acknowledge an alias to the same one you have downloaded. If you set "model": "starcoder2:latest" in your config instead, I believe this could solve the problem. Let me know if not!

@sestinj sestinj self-assigned this May 2, 2024
@xndpxs
Copy link
Author

xndpxs commented May 2, 2024

Nope didn't work. I've tried with all combinations possible (latest, 2b, -, :) none of them worked. I've tried also specifying the api and not specifying it. None of that worked. I tried with this

 "tabAutocompleteModel": {
    "title": "Tab Autocomplete Model",
    "provider": "ollama",
    "model": "llama3",
    "apiBase": "http://ip:port"
  },

And it doesn't give me errors, but it looks like it is using llama3 instead of starcoder.
Maybe it can't be seen by continue, or it can't be served correctly? because llama3 is occupying already the port?

@ahoplock
Copy link

ahoplock commented May 3, 2024

Not sure if it's related but I had pretty much the same issue yesterday when I installed the latest version (0.8.25) of the VSCode* version of the extension. While chat worked just fine with my "remote" Ollama install on a local network, auto-complete was logging errors in the VSCode debug console along the lines of, Error generating autocompletion: Error: Failed to connect to local Ollama instance. I rolled back a couple versions until I found one that worked (0.8.23) which was from 3 weeks ago. After rolling back, I was able to use the Starcoder2 3B model for auto-complete with a config like the following,

  "tabAutocompleteModel": {
    "title": "starcoder2:3b",
    "model": "starcoder2:3b-q6_K",
    "apiBase": "http://ip:port",
    "provider": "ollama"
  },

image
*not that I think it matters but I actually use VSCodium

@jarenal
Copy link

jarenal commented May 9, 2024

I don't know if this could be relevant to anyone, but in my case it works correctly with this setup:

  "tabAutocompleteModel": {
    "title": "Starcoder2 3b",
    "provider": "ollama",
    "model": "starcoder2:3b",
    "apiBase": "http://x.x.x.x:11434"
  }

My IDE is PHPStorm and I use Ollama installed on another computer of my local network.

When I execute ollama list I got:

llama3:latest                   a6990ed6be41    4.7 GB  3 days ago
starcoder2:3b                   f67ae0f64584    1.7 GB  2 days ago

@xndpxs
Copy link
Author

xndpxs commented May 9, 2024

It was fixed!
It looks like an environment variable problem.
when I run as this:

OLLAMA_HOST=ip:port ollama list

NAME                    ID              SIZE        MODIFIED     
llama3:latest           a6990ed6be41    4.7 GB      5 hours ago

It just shows 1 of the 2 models I have installed
It looks like the model wasn't installed in the env variable, if that makes any sense?
Then I installed with

OLLAMA_HOST=ip:port ollama pull starcoder2:latest

and then It woked good. Honestly, I don't remember if I installed starcoder2 before or after I modified the systemd config file:

[Unit]
Description=Ollama Service
After=network-online.target

[Service]
ExecStart=/usr/bin/ollama serve
Environment=OLLAMA_HOST=ip:port
User=ollama
Group=ollama
Restart=always
RestartSec=3

[Install]
WantedBy=default.target

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants