2 ms·
Is anybody building things like this using FSharp? It seems like FSharp would have more of the ecosystem for machine learning and AI, than OCaml, yet with the
by FrustratedMonky 2y ago
Is anybody building things like this using FSharp? It seems like FSharp would have more of the ecosystem for machine learning and AI, than OCaml, yet with the functionality of OCaml.
- greener_grass 2y agoA small community but some things going on: - https://github.com/dotnet/TorchSharp https://github.com/dotnet/TorchSharp - https://github.com/DiffSharp/DiffSharp https://github.com/DiffSharp/DiffSharp - https://github.com/fsprojects/Furnace https://github.com/fsprojects/Furnace - https://github.com/plotly/Plotly.NET https://github.com/plotly/Plotly.NET
- rybosome 2y agoAs it happens, I’ve been thinking about a library I’d like to develop in F# as an exercise to learn the language. I have a hand-rolled proxying inference framework written in Python that is similar in purpose to something like LangChain but much more stripped down, less abstraction. Similarly to many other Python tools, it leverages the reflective capabilities of the language to do things like ask LLMs for responses conforming to a data class, or pass native Python functions as tools. Best of all, it relies on native Python constructs like docstrings to provide additional context to the inference APIs, making clean and well documented code a secondary programming model in a sense. Perhaps it’s vanity, but at least in Python I find the resulting code quite elegant. I became curious what it would be like to port this to other languages, and surprisingly found that F# would, to my eyes, end up with the most lovely analogue. Even languages I expected to be expressive and terse, like Haskell, couldn’t express the same ideas as understandably yet concisely as F#.
- nickpeterson 2y agoIt’s a true shame F# isn’t more popular. It’s a great language/runtime combination for doing work quickly, correctly.
- nextos 2y agoF# has bindings to Infer.NET, by MS Research, which is incredibly good for some classes of probabilistic models and very mature. In particular, it shines on very large models or where fast quasi real-time inference is required.
- StopDisinfo910 2y agoF# is a nice language if you want to use the dotnet ecosystem but it’s basically Ocaml without anything that makes Ocaml interesting (parametrised modules).
- neonsunset 2y agoBesides parametrized modules what else do you think F# is missing? To me it seems like a 10x more powerful choice because of much richer GUI and web framework choices, great tooling and high flexibility as a language (computation expressions, does scripting, multitasking/multithreading and even low-level (when needed) quite well).
- brianberns 2y agoYes, I use F# with TorchSharp to do machine learning. My most recent project is a Hearts AI that is quite good. Here are some links: * https://github.com/brianberns/Hearts https://github.com/brianberns/Hearts * https://github.com/brianberns/MinGptSharp https://github.com/brianberns/MinGptSharp * https://github.com/brianberns/ModestGpt https://github.com/brianberns/ModestGpt * https://github.com/brianberns/DeepKuhnPoker https://github.com/brianberns/DeepKuhnPoker