trrahul / llama2.cs

Inference Llama 2 in one file of pure C#
MIT License
90 stars 13 forks source link

Simplified llama2.cs.dll #3

Open JohnClaw opened 2 months ago

JohnClaw commented 2 months ago

Llama.dll that can be downloaded from llama.cpp repo is suitable mostly for programming languages that have abilities to work with rather difficult (for novice coder) concepts like pointers, structures etc. The same thing applies to this repo. So the question is: does anybody know any simplified implementation of llama2.cs.dll or llama.cpp.dll? For example, it would be wonderful if it will be possible to work with this dll in such way:

CONSOLE

Dim LLama_DLL as Integer

Load "llama.dll" as LLama_DLL

Call function Load_Local_Gguf ("Llama-2-7b-q8.0.gguf") from LLama_DLL

Call function Set_Context_Size_For_Loaded_Gguf (4096) from LLama_DLL

Dim Answer$ As String

Dim Question$ As String

Label #Begin

Input Question$

Answer$ = Call function SentPromptToLoadedGguf (Question$) from LLama_DLL

Print Answer$

Goto #Begin

EscapeVeloc1ty commented 2 months ago

Maybe im not understanding your question correctly, my apologies... but I don't know of any implementations using VB.NET. However, as C# and VB are converted into MSIL, it seems that you could use a converter and turn any necessary C# into VB for your purposes.

JohnClaw commented 2 months ago

I'm searching implementation for any Basic dialect except VB.NET or for universal simplified llama.dll that can be used with any programming language.