Third-party providers hosting
This project is a bash-shell client for bulk-chain no-string framework for reasoning over your data using predefined CoT prompt schema.
πΊ This video showcase application of the
βοΈ Sentiment Analysis Schema towards LLaMA-3-70B-Instruct hosted by Replicate for reasoning over submitted texts
- β
Progress caching [for remote LLMs]: withstanding exception during LLM calls by using
sqlite3engine for caching LLM answers;
pip install git+https://github.com/nicolay-r/bulk-chain-shell@masterTo interact with LLM via command line with LLM output streaming support. The video below illustrates an example of application for sentiment analysis on author opinion extraction towards mentioned object in text.
Quick start :
- β¬οΈ Download replicate provider for
bulk-chain: - π Setup your reasoning
thor_cot_schema.jsonaccording to the following exampleβοΈ - π Launch
demo.pyas follows:
python3 -m bulk_chain_shell.demo \
--schema "test/schema/thor_cot_schema.json" \
--adapter "dynamic:replicate_104.py:Replicate" \
%%m \
--model_name "meta/meta-llama-3-70b-instruct" \
--api_token "<REPLICATE-API-TOKEN>" \
--streamNOTE: You have to install
source-iterandtqdmpackages that actual dependencies of this project
- β¬οΈ Download replicate provider for
bulk-chain:
wget https://raw.githubusercontent.com/nicolay-r/nlp-thirdgate/refs/heads/master/llm/replicate_104.py- π Setup your reasoning
schema.jsonaccording to the following exampleβοΈ - π Launch inference using
DeepSeek-R1:
python3 -m bulk_chain_shell.infer \
--src "<PATH-TO-YOUR-CSV-or-JSONL>" \
--schema "test/schema/default.json" \
--adapter "replicate_104.py:Replicate" \
%%m \
--model_name "deepseek-ai/deepseek-r1" \
--api_token "<REPLICATE-API-TOKEN>"All you have to do is to implement BaseLM class, that includes:
__init__-- for setting up batching mode support and (optional) model name;ask(prompt)-- infer your model with the givenprompt.
See examples with models at nlp-thirdgate π.
- bulk-chain no-string API: https://github.com/nicolay-r/bulk-chain
- Third-party providers hosting: https://github.com/nicolay-r/nlp-thirdgate?tab=readme-ov-file#llm
