where do you run the ollama, are you using linux? when i try to create my model "ollama create mymodel -f mymodel" its alway Error: accepts 1 arg(s), received 2
thanks for the video. instead of showing us how to do it, it would be nice to share with us why you would want to do this: what can you achieve by customising the model file?
Have you tried a dolphin version or equivalent of llama 3and got a good working modelfile?? Would have thought this video would blow up now since this topic is still hard to find on the interwebs.
I have played with the dolphin version a little. I may create a dedicated video for those that are interested. The channel is still new so it's hard for the channels videos to blow up right away 😁.
@@AIDevBytes That would be great if you can get one to work well.. seems like many are having an issue getting it to work well under ollama... myself included.
Be sure to check out to the videos I reference for setting up Ollama on Windows or Mac in the description if you are needing a deeper dive into Ollama. They have a more detailed overview of installing and running Ollama. MACS OLLAMA SETUP - How To Run UNCENSORED AI Models on Mac (M1/M2/M3): ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-03J_Z6FZXT4.html WINDOWS OLLAMA SETUP - Run FREE Local UNCENSORED AI Models on Windows with Ollama: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-E5k_Ilnmehc.html Ollama models are pulled into their own special directory that you shouldn't alter. Model File can be in any directory you would like to store it. The model file is a file with no extension. See model file here in Github github.com/DevTechBytes/Custom-Llama3-Model. When running the ollama commands makes sure you are in the directory you are storing your model file.
I get error like this (running on Mac ollama version is 0.1.48): Error: command must be one of "from", "license", "template", "system", "adapter", "parameter", or "message"
The templates are model specific so you don't want to change this. You will get strange output from the models if you try to create a custom template in your model file.
You are correct those are inherited, what I noticed with my testing of lots of different models is that when you don't include the template into the custom model the respond output starts including weird characters in the text with some models. So, not sure if this is a bug in Ollama. That's why you see me always copy and paste the template into new model files.
@@AIDevBytes Ok. Thanks, I just wondering that i can create a new role something like function_call or function_response in the template instead of it is embedding in assistant replied.
Hold on, so my data stays on my device with this new AI? Now that's a win for privacy. The mediatek dimensity platform collab with the meta AI seems very interesting one!
when running this in the terminal: "ollama create my-llama3-model -f custom-llama3.yml" I get this error: Error: command must be one of "from", "license", "template", "system", "adapter", "parameter", or "message"
I haven't seen that error before. If I had to guess it would be because you have a multi-line SYSTEM message but it's not wrapped in triple quotes. Example: SYSTEM """Line one Line two Line three '''""
So, what's the point of "customizing" when I can just change the system prompt? Isn't it like copying /bin/ls to /bin/myls and feeling like I accomplished something?
This a very simple example, but the purpose would be if you wanted to change multiple parameters as part of the model and use it in another application. Example, you could use the model with something like Open WebUI and then lock users into only using the model you customized with your new parameters.
@@AIDevBytes Hey, a while ago I saw a video of a user who used an API from a page called Ora and there he made a customized GPT that he then added to Godot where he practically made a simple interface to write and talk to the AI. I am currently learning Godot and I would be interested in knowing if I can use that way in which you can make a customized Llama 3 and that it can somehow communicate with a script in Godot to run within a game interface... I know what it is You probably don't know anything about Godot but the question itself is if I can use a customized version of Llama 3 and make it communicate with another medium as if it were an API or something like that (or if there is a way to do that offline)... I still haven't decided whether to download Llama through LLM studio or through Ollama
Thanks! Yes, you could use this in prod. I would recommend running it on a dedicated server with proper GPU power. Here are the specs for my computer. 🧑💻 My MacBook Pro Specs: Apple MacBook Pro M3 Max 14-Core CPU 30-Core GPU 36GB Unified Memory 1TB SSD Storage
Please help with this: **(venv) (base) iamal@IAMALs-MBP suede % ollama create my-llama3-model -f /Users/iamal/Desktop/suede/custom-llama3.yaml** Error: command must be one of "from", "license", "template", "system", "adapter", "parameter", or "message"
hi, I am trying to make a model file with these configurations: # Set the base model FROM llama3:latest # Set custom parameter values PARAMETER num_gpu 1 PARAMETER num_thread 6 PARAMETER num_keep 24 PARAMETER stop PARAMETER stop PARAMETER stop # Set the model template TEMPLATE "{{ if .System }}system {{ .System }}{{ end }}{{ if .Prompt }}user {{ .Prompt }}{{ end }}assistant getting Error: unexpected EOF Could you tell me what am I doing wrong?
Looks like you didn't close your double quotes at the end of your template. Simple mistake which can drive you crazy 😁 Let me know if that fixes your issue. EDIT: Also, use triple quotes like this when using multiple lines for your template. TEMPLATE """ Template values goes here """
@@AIDevBytes getting same error with this # Set the base model FROM llama3:latest # Set custom parameter values PARAMETER num_gpu 1 PARAMETER num_thread 6 PARAMETER num_keep 24 PARAMETER stop PARAMETER stop PARAMETER stop # Set the model template TEMPLATE """ {{ if .System }}system {{ .System }}{{ end }}{{ if .Prompt }}user {{ .Prompt }}{{ end }}assistant """
@@hamzahassan6726 I copied the model file content you had and pasted into a new file and was able to create a new model. I am not quite sure why you are the getting the error: "Error: unexpected EOF". I have not been able to duplicate the error. Also, one thing to call out looks like you are not using the llama3 template from ollama, but that doesn't appear to be causing the issue. I would make sure you are not using rich text format in your model file and ensure that it is plaintext only. if you go to the llama3 model (ollama.com/library/llama3:latest/blobs/8ab4849b038c) the template looks like this: {{ if .System }}system {{ .System }}{{ end }}{{ if .Prompt }}user {{ .Prompt }}{{ end }}assistant {{ .Response }}
The maximum context length is set by the model. So, for Llama 3, you can't go past the 8K context window. Theoretically, the larger the context window, the more data the model has to go through, sometimes making it harder for the model to differentiate important details from irrelevant information in the context. Usually, you see this in massive context windows like 100K+ context windows. You can check out Phi-3 which has a 128K context window. It's pretty good model for its size: ollama.com/library/phi3:3.8b
@@AIDevBytes Thanks. I was hoping it would be possible to get it closer to 128 which believe is what Chatgpt and Gemini have. It makes it better for long form responses/content. I'll check out Phi3.