bigcode-project / starcoder

Home of StarCoder: fine-tuning & inference!
Apache License 2.0
7.33k stars 522 forks source link

How can I implement a custom LangChain class wrapper (LLM model/Agent) for StarCoder model? #53

Open mratanusarkar opened 1 year ago

mratanusarkar commented 1 year ago

Is it possible to integrate StarCoder as an LLM Model or an Agent with LangChain, and chain it in a complex usecase? Any help / hints on the same would be appreciated!

ps: Inspired from this issue.

reachlin commented 1 year ago

like this? langchain/langchain/llms/huggingface_pipeline.py

mratanusarkar commented 1 year ago

@reachlin langchain/langchain/llms/huggingface_pipeline.py will be integrating the StarCode as a huggingface model (LLM Model). That works, but having StarCode as an Agent or chain would be more interesting. I am looking for all types of integration between LangChain and StarCode. That would allow us to do a lot of things with code and codebases.

(Pardon my ignorance. If something like this already exists, please let me know)

complete-dope commented 1 year ago

I guess as of now this is not possible as the support for custom LLM / self-made llm is not there.