Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ausboss/local-llm-langchain
Load local LLMs effortlessly in a Jupyter notebook for testing purposes alongside Langchain or other agents. Contains Oobagooga and KoboldAI versions of the langchain notebooks with examples.
https://github.com/ausboss/local-llm-langchain
agi alpaca autogpt jupyter-notebook koboldai langchain language-model llama llm llms machine-learning
Last synced: 1 day ago
JSON representation
Load local LLMs effortlessly in a Jupyter notebook for testing purposes alongside Langchain or other agents. Contains Oobagooga and KoboldAI versions of the langchain notebooks with examples.
- Host: GitHub
- URL: https://github.com/ausboss/local-llm-langchain
- Owner: ausboss
- Created: 2023-04-12T20:13:47.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-06-25T06:20:18.000Z (over 1 year ago)
- Last Synced: 2024-11-06T00:39:31.174Z (9 days ago)
- Topics: agi, alpaca, autogpt, jupyter-notebook, koboldai, langchain, language-model, llama, llm, llms, machine-learning
- Language: Jupyter Notebook
- Homepage:
- Size: 93.8 KB
- Stars: 211
- Watchers: 8
- Forks: 26
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Notebook for Local LLMs
The goal of this project is to allow users to easily load their locally hosted language models in a notebook for testing with Langchain.
There are currently three notebooks available. Two of them use an API to create a custom Langchain LLM wrapper—one for oobabooga's text generation web UI and the other for KoboldAI. The third notebook loads the models without an API by leveraging the oobabooga's text-generation-webui virtual environment and modules for model loading.You will end up with an instance of the Custom LLM Wrapper that can be used to generate text:
```llm("prompt goes here")```
You can use this instead of the OpenAI LLM class that you see used in most of the guides and documentation.
## Getting Started
Please follow the setup instructions for the APIs provided in their respective repositories. Just update the url variable with your api url then run the cells to create an instance of the Custom LLM Wrapper.### Roadmap
Using the API is now my preferred method for loading the models. I plan on improving the API classes/notebooks, but for now, they work quite well. I'm leaving the non-api stuff up for now, but I won't be actively maintaining them in the future, so things might break.### Non-API Notebook Instructions:
1. Activate your Python or Conda environment.
2. Install Jupyter Notebook by running `pip install jupyter` in your preferred command prompt or terminal.
3. Restart your command prompt or terminal to ensure that the installation is properly configured.
4. Activate your Python or Conda environment again and run `jupyter notebook` in the command prompt or terminal to launch the Jupyter interface.
5. Navigate to the directory where `Non-API-Notebook.ipynb` is located (ooba users put it in `./text-generation-webui/` and open the notebook in the Jupyter interface.