# Seeking Local AI Model for Assisting Students with Coding Exercises

**URL:** <https://discuss.huggingface.co/t/seeking-local-ai-model-for-assisting-students-with-coding-exercises/105955>\
**Category:** Beginners\
**Created:** [September 9, 2024, 7:01am UTC](https://discuss.huggingface.co/t/seeking-local-ai-model-for-assisting-students-with-coding-exercises/105955 "2024-09-09T07:01:08Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![yosiNewman](https://avatars.discourse-cdn.com/v4/letter/y/ecd19e/32.png) [@yosiNewman](https://discuss.huggingface.co/u/yosiNewman)\
**Post date:** [September 9, 2024, 7:01am UTC](https://discuss.huggingface.co/t/seeking-local-ai-model-for-assisting-students-with-coding-exercises/105955/1 "2024-09-09T07:01:08Z")

</div>

Hello everyone,

I’m a computer science teacher looking for a local AI model that can assist my students with their coding exercises. The ideal model would:

- Allow students to submit their coding exercise along with their proposed solution.
- Evaluate the solution’s correctness.
- Identify any edge cases the student might have overlooked.
- Provide a score for the solution.

I’m specifically seeking a solution that can run locally on our school server, allowing students to use it during lab sessions.

I’ve had success with the following prompt when using Claude:

\*\* _You’re a programming assistant helping students improve their coding skills. Here’s how to guide the conversation:_

1. _Ask the student to provide the full question or exercise and their code solution._
2. _After the student provides the information, analyze their solution and give:_

- _A score from 0 to 100 for the solution._
- _A brief hint on where the code could be improved or what to consider._

1. _If the student asks for another hint, provide additional guidance, but avoid giving the full solution._
2. _Allow the student to submit revised versions of the code as many times as they want. Each time, give a new score and another hint if needed._
3. _The hints should be small and incremental, encouraging the student to think for themselves._
4. _Never give the full solution at any point, even if the student asks for it._

_When giving a score, deduct points as follows:_

- _Minor syntax errors (like missing semicolons): slight deduction._
- _Logical issues or bugs: moderate deduction._
- _Completely incorrect solutions or misunderstanding of the problem: very low score or zero._

_Encourage the student to keep trying and improving their code._

_Remember, the goal is to help students learn and develop, not to solve the problem for them._ \*\*

This prompt works excellently with Claude, but the cost makes it impractical for regular use. When trying it with ChatGPT, the AI tends to provide the full solution instead of offering gradual hints, which is not ideal.

I’m looking for recommendations on local models or solutions that can replicate this functionality. The model should be able to analyze code, provide incremental hints, and avoid giving away complete solutions. Any suggestions or experiences with similar setups would be greatly appreciated!

---

<div class="post-metadata">

**Author:** ![nielsr](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/nielsr/32/39617_2.png) [@nielsr](https://discuss.huggingface.co/u/nielsr)\
**Post date:** [September 21, 2024, 8:40am UTC](https://discuss.huggingface.co/t/seeking-local-ai-model-for-assisting-students-with-coding-exercises/105955/2 "2024-09-21T08:40:07Z")

</div>

Hi,

For coding, you might take a look at this benchmark: [https://bigcode-bench.github.io/](https://bigcode-bench.github.io/). It benchmarks various models for coding, both open- and closed-source. A leaderboard is hosted here: [BigCodeBench Leaderboard - a Hugging Face Space by bigcode](https://huggingface.co/spaces/bigcode/bigcodebench-leaderboard).

Currently, the best (but this might change in a week as models get shipped fast) include [deepseek-ai/DeepSeek-Coder-V2-Instruct-0724 · Hugging Face](https://huggingface.co/deepseek-ai/DeepSeek-Coder-V2-Instruct-0724) and [Qwen-2.5](https://huggingface.co/collections/Qwen/qwen25-66e81a666513e518adb90d9e).

- DeepSeek-V2 has 236 billion parameters, so it requires at least 236GB of GPU RAM in case you run it with 4-bit quantization.
- Qwen-2.5 (specifically the 72B variant) is on top on livebench.ai for the “coding” section and is much more feasible to run in a local environment. The model collection includes GGUF quantized versions.

For smaller models, a good current model is the [Qwen-2.5-Coder](https://huggingface.co/collections/Qwen/qwen25-coder-66eaa22e6f99801bf65b0c2f) series, coming in both 1.5B and 7B sizes.

---

<div class="post-metadata">

**Author:** ![yosiNewman](https://avatars.discourse-cdn.com/v4/letter/y/ecd19e/32.png) [@yosiNewman](https://discuss.huggingface.co/u/yosiNewman)\
**Post date:** [September 21, 2024, 7:02pm UTC](https://discuss.huggingface.co/t/seeking-local-ai-model-for-assisting-students-with-coding-exercises/105955/3 "2024-09-21T19:02:57Z")

</div>

Thank you very much for the recommendation!  
I don’t have very strong processing power, so I’ll try the smaller versions.  
Can these models help guide students towards a solution without giving the full answer, and even provide a score?  
Or is their focus more on code generation?

Also, do they support Hebrew, at least for responses? If not, I can use a translation tool to handle that.  
thanks
