langchain/docs
Ravindra Marella b3988621c5
Add C Transformers for GGML Models (#5218)
# Add C Transformers for GGML Models
I created Python bindings for the GGML models:
https://github.com/marella/ctransformers

Currently it supports GPT-2, GPT-J, GPT-NeoX, LLaMA, MPT, etc. See
[Supported
Models](https://github.com/marella/ctransformers#supported-models).


It provides a unified interface for all models:

```python
from langchain.llms import CTransformers

llm = CTransformers(model='/path/to/ggml-gpt-2.bin', model_type='gpt2')

print(llm('AI is going to'))
```

It can be used with models hosted on the Hugging Face Hub:

```py
llm = CTransformers(model='marella/gpt-2-ggml')
```

It supports streaming:

```py
from langchain.callbacks.streaming_stdout import StreamingStdOutCallbackHandler

llm = CTransformers(model='marella/gpt-2-ggml', callbacks=[StreamingStdOutCallbackHandler()])
```

Please see [README](https://github.com/marella/ctransformers#readme) for
more details.
---------

Co-authored-by: Dev 2049 <dev.dev2049@gmail.com>
2023-05-25 13:42:44 -07:00
..
_static docs: Big Mendable Improvements (#4964) 2023-05-19 15:31:48 -07:00
additional_resources docs: Deployments page moved into Ecosystem/ (#4949) 2023-05-21 21:18:22 -07:00
ecosystem Harrison/modelscope (#5156) 2023-05-24 08:06:45 -07:00
getting_started fix a mistake in concepts.md (#5222) 2023-05-24 21:47:22 -07:00
integrations Add C Transformers for GGML Models (#5218) 2023-05-25 13:42:44 -07:00
modules Add C Transformers for GGML Models (#5218) 2023-05-25 13:42:44 -07:00
reference docs: compound ecosystem and integrations (#4870) 2023-05-18 09:29:57 -07:00
tracing Some notebook and client fixes (add retries, clean up docs, etc) (#4820) 2023-05-16 20:23:00 -07:00
use_cases Typos (#4851) 2023-05-17 11:52:22 -04:00
conf.py docs: Mendable Search integration (#2803) 2023-04-13 21:52:25 -07:00
dependents.md docs: added ecosystem/dependents page (#4941) 2023-05-18 13:11:08 -07:00
index.rst docs: Deployments page moved into Ecosystem/ (#4949) 2023-05-21 21:18:22 -07:00
integrations.rst docs: Deployments page moved into Ecosystem/ (#4949) 2023-05-21 21:18:22 -07:00
make.bat initial commit 2022-10-24 14:51:15 -07:00
Makefile Feature: linkcheck-action (#534) (#542) 2023-01-04 21:39:50 -08:00
reference.rst docs: Deployments page moved into Ecosystem/ (#4949) 2023-05-21 21:18:22 -07:00
requirements.txt Harrison/docs reqs (#2199) 2023-03-30 08:20:30 -07:00