3 ms·
tl;dr: LLM struggle to write performant/correct code unless you use codeflash. The "trick" is that you run tests/benchmarks against the generated code. It is no
by csomar 2y ago
tl;dr: LLM struggle to write performant/correct code unless you use codeflash. The "trick" is that you run tests/benchmarks against the generated code. It is not clear whether codeflash does that for you, or you have to write your tests/benchmarks and then codeflash runs a loop trying different versions while testing against your code.
- misrasaurabh1 2y agoHi, I am the creator of Codeflash. The idea is to do everything that a professional performance engineer would do and to automate it. So codeflash, analyzes your code, creates correctness tests, creates performance benchmarking tests, executes these tests to figure out the behavior and performance of code. Along side it also profiles and determines the line coverage of your original code. Then it uses all this info to generate multiple optimizations and applies them one by one to see if the new code is indeed an optimization, i.e. is correct and is more performant. If this is the case then it opens a Pull Request for dev's review with all the info.
- misrasaurabh1 2y agoCodeflash is still new but it is very strong at optimizing general purpose python code, especially PyTorch, NumPy or algorithmic code. If you want to try out optimizations - try optimizing this sample repo https://github.com/codeflash-ai/optimize-me https://github.com/codeflash-ai/optimize-me