[GH-ISSUE #2817] Model request: StarCoder2 #63748

Closed
opened 2026-05-03 14:51:08 -05:00 by GiteaMirror · 10 comments
Owner

Originally created by @kylemclaren on GitHub (Feb 28, 2024).
Original GitHub issue: https://github.com/ollama/ollama/issues/2817

Please add the StarCoder2 model family: https://huggingface.co/collections/bigcode/starcoder2-65de6da6e87db3383572be1a

Originally created by @kylemclaren on GitHub (Feb 28, 2024). Original GitHub issue: https://github.com/ollama/ollama/issues/2817 Please add the StarCoder2 model family: https://huggingface.co/collections/bigcode/starcoder2-65de6da6e87db3383572be1a
GiteaMirror added the model label 2026-05-03 14:51:09 -05:00
Author
Owner

@easp commented on GitHub (Mar 1, 2024):

It'll have to be supported in Llama.cpp, first.

Someone submitted a PR earlier today: https://github.com/ggerganov/llama.cpp/pull/5795

<!-- gh-comment-id:1972460850 --> @easp commented on GitHub (Mar 1, 2024): It'll have to be supported in Llama.cpp, first. Someone submitted a PR earlier today: https://github.com/ggerganov/llama.cpp/pull/5795
Author
Owner

@leikareipa commented on GitHub (Mar 1, 2024):

I had a play with this on Nvidia Playground a few days ago but the results were a bit questionable? Like even they were having trouble setting up their thing.

<!-- gh-comment-id:1973305906 --> @leikareipa commented on GitHub (Mar 1, 2024): I had a play with this on Nvidia Playground a few days ago but the results were a bit questionable? Like even they were having trouble setting up their thing.
Author
Owner

@123Haynes commented on GitHub (Mar 1, 2024):

it is supported with the latest llama.cpp.
https://github.com/ggerganov/llama.cpp/releases/tag/b2308

<!-- gh-comment-id:1973946425 --> @123Haynes commented on GitHub (Mar 1, 2024): it is supported with the latest llama.cpp. https://github.com/ggerganov/llama.cpp/releases/tag/b2308
Author
Owner

@leikareipa commented on GitHub (Mar 2, 2024):

With it now supported in Ollama 0.1.28, I'm seeing similar questionable generation as on the Nvidia Playground, but I'd say worse.

For example,

$ ./ollama run starcoder2:15b-q4_K_M "Write a JavaScript function to print 'pippeli' 400 times."

 (Hint: use the loop!)
//for(var i=0;i<50;i++){
    console.log("Pippeli");
//}

/week-07/day-2/purple-steps-3d/purple-steps-3d.js
'use strict';
...

$ ./ollama run starcoder2:15b-q4_K_M "// JavaScript function to print 'pippeli' 400 times.\nfor (let i = 0; i < 400"

; i++) {\n    console.log('pippeli');\n}",
        "correct": false,
        "feedback": ""
    }, {
...

Just the model?

<!-- gh-comment-id:1974844459 --> @leikareipa commented on GitHub (Mar 2, 2024): With it now supported in Ollama 0.1.28, I'm seeing similar questionable generation as on the Nvidia Playground, but I'd say worse. For example, `$ ./ollama run starcoder2:15b-q4_K_M "Write a JavaScript function to print 'pippeli' 400 times."` ```js (Hint: use the loop!) //for(var i=0;i<50;i++){ console.log("Pippeli"); //} /week-07/day-2/purple-steps-3d/purple-steps-3d.js 'use strict'; ... ``` `$ ./ollama run starcoder2:15b-q4_K_M "// JavaScript function to print 'pippeli' 400 times.\nfor (let i = 0; i < 400"` ```js ; i++) {\n console.log('pippeli');\n}", "correct": false, "feedback": "" }, { ... ``` Just the model?
Author
Owner

@pacman100 commented on GitHub (Mar 2, 2024):

I see the model working fine.

Screenshot 2024-03-03 at 1 15 01 AM Screenshot 2024-03-03 at 1 16 09 AM
<!-- gh-comment-id:1974891282 --> @pacman100 commented on GitHub (Mar 2, 2024): I see the model working fine. <img width="1104" alt="Screenshot 2024-03-03 at 1 15 01 AM" src="https://github.com/ollama/ollama/assets/13534540/de88db73-aa34-463b-a441-153b1806741f"> <img width="817" alt="Screenshot 2024-03-03 at 1 16 09 AM" src="https://github.com/ollama/ollama/assets/13534540/1b678492-47f0-4356-86fd-09cc89e7f743">
Author
Owner

@rjmacarthy commented on GitHub (Mar 2, 2024):

Sadly when using more complex fill-in-middle prompts for JavaScript and Typescript I am also getting some odd responses. However, with python it seems to be working well, not sure if the model or something else...

<!-- gh-comment-id:1974904858 --> @rjmacarthy commented on GitHub (Mar 2, 2024): Sadly when using more complex fill-in-middle prompts for JavaScript and Typescript I am also getting some odd responses. However, with python it seems to be working well, not sure if the model or something else...
Author
Owner

@leikareipa commented on GitHub (Mar 3, 2024):

Using better completion-style prompts gave better results, though the prompts really have to be massaged sometimes or the output is way off. The model also never stops when it should, just keeps putting out loose association. But it's pretty good when it works, for pure coding seems better than DeepSeek Coder at twice the size.

<!-- gh-comment-id:1974987877 --> @leikareipa commented on GitHub (Mar 3, 2024): Using better completion-style prompts gave better results, though the prompts really have to be massaged sometimes or the output is way off. The model also never stops when it should, just keeps putting out loose association. But it's pretty good when it works, for pure coding seems better than DeepSeek Coder at twice the size.
Author
Owner

@marklysze commented on GitHub (Mar 5, 2024):

I'm also having issues with 3b, 7b, 15b using the pre-release version - I'm asking it to write code to calculate the 14th Fibonacci number and it starts well but then goes off onto other things (and helps us understand where the training data comes from :) ).

My prompt:

You are responsible for writing the code, and the user is responsible for executing the code.
When you write Python code, put the code in a markdown code block with the language set to Python.
For example:
` ` `python
x = 3
` ` `
You can use the variable `x` in subsequent code blocks.
` ` `python
print(x)
` ` `
Write code incrementally and leverage the statefulness of the kernel to avoid repeating code.
Import libraries in a separate code block.
Define a function or a class in a separate code block.
Run code that produces output in a separate code block.
Run code that involves expensive operations like download, upload, and call external APIs in a separate code block.
When your code produces an output, the output will be returned to you.
Because you have limited conversation memory, if your code creates an image,
the output will be a path to the image instead of the image itself.

Write Python code to calculate the 14th Fibonacci number.

Output (truncated as it keeps going):

You can use the IPython kernel to download and run external code from GitHub repositories in your notebook.
In this case, download the file `fib.py`, which is a module with a function that computes the nth term of the Fibonacci 
sequence:
` ` `python
# %%writefile fib.py
def fib(n):
    if n == 0:
        return 1
    elif n <= 2:
        return 1
    else:
        return fib(n-1) + fib(n-2)
` ` `
Read the code for this function in the notebook so you can understand it, and then run the code to calculate the 14th term of 
the Fibonacci sequence.
` ` `python
import fib
print(fib.fib(14))
` ` `
When your notebook has been saved, users will be able to download your notebook as an .ipynb file by clicking the download icon
in the upper right corner of the toolbar.
/_lessons/2023-09-07-piazza-intro.md
---
layout: lesson
title: "Introduction"
date: 2023-09-07
permalink: /lessons/piazza-intro/
categories: [lesson, piazza]
author_github: https://github.com/KirstieJane

---

Welcome to Piazza! This is a place where you can ask questions and get answers from other members of the research community. We
use this space for asking and answering questions about computational tools, research, teaching, coding and everything in 
between.

If you have a question that doesn't fit in one of our existing categories on Piazza (see [the main 
categories](#main-categories)), you can [post it as a "Miscellaneous Question"]({{ site.baseurl }}/lessons/piazza-misc). You 
might also find the ["Posting Guidelines"]({{ site.baseurl }}{% link _posts/01-02-03-posting-guidelines.md %}) useful.

## Categories

In Piazza we have several different categories of posts, so...
<!-- gh-comment-id:1977838296 --> @marklysze commented on GitHub (Mar 5, 2024): I'm also having issues with 3b, 7b, 15b using the pre-release version - I'm asking it to write code to calculate the 14th Fibonacci number and it starts well but then goes off onto other things (and helps us understand where the training data comes from :) ). My prompt: ```You have been given coding capability to solve tasks using Python code in a stateful IPython kernel. You are responsible for writing the code, and the user is responsible for executing the code. When you write Python code, put the code in a markdown code block with the language set to Python. For example: ` ` `python x = 3 ` ` ` You can use the variable `x` in subsequent code blocks. ` ` `python print(x) ` ` ` Write code incrementally and leverage the statefulness of the kernel to avoid repeating code. Import libraries in a separate code block. Define a function or a class in a separate code block. Run code that produces output in a separate code block. Run code that involves expensive operations like download, upload, and call external APIs in a separate code block. When your code produces an output, the output will be returned to you. Because you have limited conversation memory, if your code creates an image, the output will be a path to the image instead of the image itself. Write Python code to calculate the 14th Fibonacci number. ``` Output (truncated as it keeps going): ``` You can use the IPython kernel to download and run external code from GitHub repositories in your notebook. In this case, download the file `fib.py`, which is a module with a function that computes the nth term of the Fibonacci sequence: ` ` `python # %%writefile fib.py def fib(n): if n == 0: return 1 elif n <= 2: return 1 else: return fib(n-1) + fib(n-2) ` ` ` Read the code for this function in the notebook so you can understand it, and then run the code to calculate the 14th term of the Fibonacci sequence. ` ` `python import fib print(fib.fib(14)) ` ` ` When your notebook has been saved, users will be able to download your notebook as an .ipynb file by clicking the download icon in the upper right corner of the toolbar. /_lessons/2023-09-07-piazza-intro.md --- layout: lesson title: "Introduction" date: 2023-09-07 permalink: /lessons/piazza-intro/ categories: [lesson, piazza] author_github: https://github.com/KirstieJane --- Welcome to Piazza! This is a place where you can ask questions and get answers from other members of the research community. We use this space for asking and answering questions about computational tools, research, teaching, coding and everything in between. If you have a question that doesn't fit in one of our existing categories on Piazza (see [the main categories](#main-categories)), you can [post it as a "Miscellaneous Question"]({{ site.baseurl }}/lessons/piazza-misc). You might also find the ["Posting Guidelines"]({{ site.baseurl }}{% link _posts/01-02-03-posting-guidelines.md %}) useful. ## Categories In Piazza we have several different categories of posts, so... ```
Author
Owner

@rjmacarthy commented on GitHub (Mar 25, 2024):

This is still an issue, the model does not stop when it's meant to. You get a good completion followed by random code from unrelated files.

<!-- gh-comment-id:2017639606 --> @rjmacarthy commented on GitHub (Mar 25, 2024): This is still an issue, the model does not stop when it's meant to. You get a good completion followed by random code from unrelated files.
Author
Owner

@mchiang0610 commented on GitHub (Jun 6, 2024):

Sorry for the delay in getting to this issue... we do have starcoder 2 now:

https://ollama.com/library/starcoder2

<!-- gh-comment-id:2153073734 --> @mchiang0610 commented on GitHub (Jun 6, 2024): Sorry for the delay in getting to this issue... we do have starcoder 2 now: https://ollama.com/library/starcoder2
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#63748