Our new LangChain Academy Course Deep Research with LangGraph is now live!
Enroll for free.
DeepSparseThis page covers how to use the DeepSparse inference runtime within LangChain. It is broken into two parts: installation and setup, and then examples of DeepSparse usage.
Installation and Setuppip install deepsparse
There exists a DeepSparse LLM wrapper, which you can access with:
from langchain_community.llms import DeepSparse
It provides a unified interface for all models:
llm = DeepSparse(model='zoo:nlg/text_generation/codegen_mono-350m/pytorch/huggingface/bigpython_bigquery_thepile/base-none')
print(llm.invoke('def fib():'))
Additional parameters can be passed using the config
parameter:
config = {'max_generated_tokens': 256}
llm = DeepSparse(model='zoo:nlg/text_generation/codegen_mono-350m/pytorch/huggingface/bigpython_bigquery_thepile/base-none', config=config)
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4