python

[GPT][PRIVATEGPT] HuggingFacePipeline

으누아빠 2024. 4. 16. 15:08
반응형

HuggingFacePipeline

HuggingFacePipeline 클래스를 통해 Hugging Face 모델을 로컬에서 실행가능

실행하면 해당 모델을 컴퓨터에 다운로드 받고 오프라인에서 실행함


from langchain.llms.huggingface_pipeline import HuggingFacePipeline

 


GPT2 허깅페이스 주소:

https://huggingface.co/gpt2

 

openai-community/gpt2 · Hugging Face

GPT-2 Test the whole generation capabilities here: https://transformer.huggingface.co/doc/gpt2-large Pretrained model on English language using a causal language modeling (CLM) objective. It was introduced in this paper and first released at this page. Dis

huggingface.co

 

[결과]

" fairly common potato in the United States but there's also some other popular varieties like sweet potato, butchered potatoes and red potatoes, which are similar ones, sometimes have different flavor characteristics.\n\nThe first potato with a green side, made around 1900, was named for its red colour. A green is often found in many colors, such as yellow, black, white and maroon. Although the green was generally very difficult for potato hunters to distinguish, it was considered to be far more versatile than blue and orange in that it could eat a variety of potatoes.\n\nThe only original potato ever found, called the green in the US is called the potato of the year in American Indian tradition, which is a very common name for other varieties"

'python' 카테고리의 다른 글

[GPT][PRIVATEGPT] Ollama  (0) 2024.04.16
[GPT][PRIVATEGPT] GPT4All  (0) 2024.04.16
[GPT][PRIVATEGPT]HuggingFaceHub  (0) 2024.04.16
[GPT][문서검색] Streaming  (0) 2024.04.15
[GPT][문서 검색] Chain  (0) 2024.04.15