langchain 과 llm을 이용해서 무언가(?) 만들기
langchain
LLM model’s framework
langchain homepage
langchain python
langchain github
local llm model
https://python.langchain.com/docs/guides/local_llms
opengpts
https://github.com/langchain-ai/opengpts
streamlit.io (frontend)
LLAMA2
ctransformers
경량화 llama2를 쓰기 위해 필요함 https://github.com/marella/ctransformers
llama2 chatgpt처럼 쓰기
ai 사용 관련 참고
직접 만들기
llama2 down받기 (llama-2-7b.ggmlv3.q8_0.bin)
pip install langchain
pip install ctransformers
source code
from langchain.llms import CTransformers
llm = CTransformers(
model="llama-2-7b.ggmlv3.q8_0.bin",
model_type="llama"
)
result = llm.predict("what do you name?")
print(result)