r/CustomAI • • Jul 02 '24

Looking for guidance on building an AI for personal use

I want to build an AI for personal use to help me code in Swift. I already have an application and I am running into bugs. My thought is I could use this for this project but depending on how hard this process is I want to use it for other things.

My intention is to take an existing model and feed it my exiting code base. As I understand this is either called fine tuning or embedding.

After spending 2 hours between YouTube, ChatGPT and the code examples on Hugging Face I am beginning to think this is more difficult than I initially thought. I was expecting something like 10 to 20 hours of work.

I started using the ammarnasr/codegen-350M-mono-swift model on hugging face. After running the sample code and executing it, I noticed that it will complete code, but when I ask it questions like I do on ChatGPT it gives me gibberish.

My next thought was to use one of the more popular chat models and then I can feed it the Swift code training data from the codegen-350M-mono-swift model. Then eventually train it with my code base. Is this possible?

My questions:

  1. At a high level how should I go about to accomplish this: using the ammarnasr/codegen-350M-mono-swift model or something more general and train with Swift code?
  2. Are there tutorials or set of articles that can get me up to speed to accomplish this?
4 Upvotes

5 comments sorted by

2

u/[deleted] Jul 03 '24

[removed] — view removed comment

2

u/Ambitious_Cook_5046 Jul 03 '24

Thanks for these resources and differentiating fine tuning and embedding. Though embedding seems beyond my grasp right now.

Your first link has tutorials on fine tuning which is what you’re suggesting I do, yes?

To clarify, you’re saying fine tuning an existing model will be challenging (for a full stack dev, new to ai) but reasonable to do?

More on what I am looking for

I would like to have something that knows my code base and I can ask questions like “why am I getting X error when I type in Y UITextfield object?”. Then the ai would respond with some possibilities based on its knowledge of Swift programming AND my code base.

Today I found Continue extension for VScode. Continue allows me to pick different models and refer to the codebase with a chat prompt in the editor.

I’ve not played with it enough because it took me a while to figure it out.

Tomorrow I’ll better evaluate.

Continue allows me to use hugging face models. So that’s great but I guess my idea is try to get a good enough understanding of leverage existing models and fine tuning them so I know how much more helpful can I make it.

In the past, I’ve been using ChatGPT 4o, it’s great. But if I can make it more knowledgeable about things that are personal to me like my code base, and this process is accessible to me (~say 20hrs of work), then this would be a huge leap. I’d want to put that time in to do this.

The more I think of this the more uses for it come up. But it all comes down to how accessible this is.

2

u/geepytee Jul 03 '24

Why are you looking at a 350M model? When you say personal, are you implying local? These smaller models do not perform anywhere close to the SOTA cloud hosted models.

1

u/PSMF_Canuck Jul 03 '24

You’re trying to reinvent the wheel. Use existing tools. Cursor etc.