Documentation
-
Torch Functions
LangTorch integrates with many Torch functions, allowing
TextTensors
andTextModules
to utilize PyTorch utilities and autograd. -
Text Objects
Text
objects are the structured (markup) text entries used in TextTensors and Modules. They enable the formatting multiplication operation in TextTensors and provide support for convenient workflow with markup languages like markdown. -
TextTensors
TextTensors
is the main data structure for prompt templating, embeddings and tokens, over which we perform LLM calls. -
TextModules
TextModules
are the building blocks for creating sequences of operations on text data, including both operations on text and embeddings. Their use is governed by similar rules as PyTorchnn.Modules
with composability and support for torch utilities. -
Activations
Activations
areTextModules
used to call LLMs on the inputTextTensor
entries. Currently they support convenient parallel calls to OpenAI, but a custom implementation can be used for local models and other APIs.