4 ms·
I don't get it, GPT-2 is (one of the few) open models from OpenAI, you can just run it locally, why would you use their API for this? https://github.com/openai/
by gigel82 3y ago
I don't get it, GPT-2 is (one of the few) open models from OpenAI, you can just run it locally, why would you use their API for this?
https://github.com/openai/gpt-2 https://github.com/openai/gpt-2
- sumedh 3y agoI am assuming GPT 4 will provide better answers to your queries compared to GPT 2.
- simonw 3y agoIt's not using GPT-2 - the README is incorrect. It's using "from langchain.embeddings import OpenAIEmbeddings" - which is the OpenAI embeddings API, text-embedding-ada-002 The only aspect of GPT-2 this is using is GPT2TokenizerFast.from_pretrained("gpt2") - which it uses as the length function to count tokens for the RecursiveCharacterTextSplitter() langchain utility. Which doesn't really make sense - why use the GPT-2 tokenizer for that? May as well just count characters or even count words based on .split(), it's not particularly important how the counting works here.
- raghavankl 3y agoThe embedding model used is the default OpenAI API embedding, text-embedding-ada-002. GPT2 is only used during the tokenization process to calculate token lengths efficiently. I have updated my readme to reflect this information correctly.