4 ms·
could this be used for locally translating between programming languages in addition to natural languages? any models for that available i wonder?
by andrekandre 3y ago
could this be used for locally translating between programming languages in addition to natural languages?
any models for that available i wonder?
- vertis 3y agoIt depends on the scale you're talking about but the local LLMs are fairly capable of translating between different programming languages, particularly if you're not so concerned about external library support. Pasting a function in and asking for it in a different programming language will get an implementation in the target language. Using ollama run llama2:13b on my mac will allow converting in this fashion. It might not be the best code, but this is true of machine translations as well.
- andrekandre 3y agothanks for the reply! > Using ollama run llama2:13b on my mac will allow converting in this fashion okay, i'll have t try this out > It might not be the best code, but this is true of machine translations as well. true, one thing im hoping for is some local version of copilot/chatgpt for code where its trained on local libraries and the local project and such (and can translate them in some scenarios)
- Intralexical 3y agoComputer programming languages are already machine-parsable though. ML does not seem like the appropriate solution for converting between them. Technically what you're describing is done by a compiler/decompiler/transpiler, operating on the AST.
- warkdarrior 3y agoProgramming languages are machine-parseable if you already have a parser for them. The befit of LLMs is that you do not need a parser for each programming language.