Smorty [she/her]

I’m a person who tends to program stuff in Godot and also likes to look at clouds. Sometimes they look really spicy outside.

  • 40 Posts
  • 203 Comments
Joined 1 year ago
cake
Cake day: July 5th, 2023

help-circle
  • You are right in that it can be useful to feed in all of the contents in other related files.

    However!

    LLMs take a really long time before writing anything with a large context input. the fact that githubs copilot can generate code so quickly even though it has to keep the entire code file in context is a miracle to me.

    Including all related or opened GDScript files would be way too much for most models and it would likely take about 20 seconds for it to actually start generate some code (also called first token lag). So I will likely only implement the current file into the context window, as that might already take some time. Remember, we are running local LLMs here, so not everyone has a blazingly fast GPU or CPU (I use a GTX1060 6GB for instance).

    Example

    I just tried it and it took a good 10 seconds for it to complete some 111 line code without any other context using this pretty small model and then about 6 seconds for it to write about 5 lines of comment documentation (on my CPU). It takes about 1 second with a very short script.

    You can try this yourself using something like HuggingChat to test out a big context window model like Command R+ and fill its context windw with some really really long string (copy paste it a bunch times) and see how it takes longer to respond. For me, it’s the difference between one second and 13 seconds!

    I am thinking about embedding either the current working file, or maybe some other opened files though, to get the most important functions out of the script to keep context length short. This way we can shorten this first token delay a bit.

    This is a completely different story with hosted LLMs, as they tend to have blazingly quick first token delays, which makes the wait trivial.