Documentation
-
Torch Functions
LangTorch integrates with many Torch functions, allowing
TextTensorsandTextModulesto utilize PyTorch utilities and autograd. -
Text Objects
Textobjects 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
TextTensorsis the main data structure for prompt templating, embeddings and tokens, over which we perform LLM calls. -
TextModules
TextModulesare 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.Moduleswith composability and support for torch utilities. -
Activations
ActivationsareTextModulesused to call LLMs on the inputTextTensorentries. Currently they support convenient parallel calls to OpenAI, but a custom implementation can be used for local models and other APIs.