Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/AdamSobieszek/langtorch
/ functions
Functions
413 in github.com/AdamSobieszek/langtorch
⨍
Functions
413
◇
Types & classes
72
Method
forward
(ctx, input, other)
src/langtorch/tt/functional.py:72
Method
forward
(ctx, input1, input2)
src/langtorch/tt/functional.py:94
Method
forward
(ctx, input, args, kwargs)
src/langtorch/tt/functional.py:124
Method
forward
(ctx, input, args=tuple(), kwargs=None)
src/langtorch/tt/functional.py:148
Method
forward
(ctx, input, p=0.5, training=True, inplace=False)
src/langtorch/tt/functional.py:179
Method
forward
(ctx, input, on, dim=0)
src/langtorch/tt/functional.py:228
Method
forward
(ctx, input, shape)
src/langtorch/tt/functional.py:249
Method
forward
(ctx, input)
src/langtorch/tt/functional.py:267
Method
forward
(ctx, input, sep="", dim=None)
src/langtorch/tt/functional.py:281
Method
forward
(ctx, input, shape)
src/langtorch/tt/functional.py:326
Method
forward
(ctx, input, axes)
src/langtorch/tt/functional.py:341
Method
forward
(ctx, input, pad, mode='constant', value='')
src/langtorch/tt/functional.py:355
Method
forward
(ctx, input, index)
src/langtorch/tt/functional.py:396
Method
forward
(ctx, input: TextTensor, target: TextTensor, prompt: TextTensor)
src/langtorch/tt/modules/to_tt/loss.py:33
Method
forward
(self, input: TextTensor, target: TextTensor)
src/langtorch/tt/modules/to_tt/loss.py:65
Method
forward
(self, input)
src/langtorch/tt/modules/to_tt/linear.py:40
Method
forward
(self, input_texttensor: TextTensor, skip_special_tokens=True, **gen_kwargs)
src/langtorch/tt/modules/to_tt/transformers.py:27
Method
forward
By default, the TextModule forward formats the input using the prompt template tensors using TextTensor multiplication,
src/langtorch/tt/modules/to_tt/textmodule.py:113
Method
forward
(self, text_tensor: TextTensor, tool_kwargs=dict())
src/langtorch/tt/modules/to_tt/assistantmodule.py:23
Method
forward
(self, input_text_tensor)
src/langtorch/tt/modules/to_tt/codemodule.py:16
Method
forward
(self, input: Tensor)
src/langtorch/tt/modules/to_tt/conv.py:272
Method
forward
(ctx, input_tensor, activation)
src/langtorch/tt/modules/to_tt/activation.py:18
Method
forward
(self, inputs)
src/langtorch/tt/modules/to_tt/activation.py:130
Method
forward
(self, input: TextTensor)
src/langtorch/tt/modules/to_tt/activation.py:187
Method
forward
r""" Args: query: Query embeddings of shape :math:`(L, E_q)` for unbatched input, :math:`(L, N, E_q)` when ``batch_first=False``
src/langtorch/tt/modules/to_tt/activation.py:263
Method
forward
(self, input_texttensor: TextTensor, skip_special_tokens=True, **gen_kwargs)
src/langtorch/tt/modules/to_t/tokenizer.py:23
Method
forward
(self, t1: TextTensor, t2: TextTensor)
src/langtorch/tt/modules/to_t/distance.py:38
Method
forward
(self, x: TextTensor)
src/langtorch/tt/modules/to_t/embedding.py:16
Method
from_api_responses
Text from a list of dicts of OpenAI style API responses
src/langtorch/texts/text.py:166
Method
from_df
(cls, df: 'DataFrame', **kwargs)
src/langtorch/tensors/texttensor.py:487
Method
from_file
(self, filename: str, shared: bool = False, nbytes: int = 0)
src/langtorch/types.py:49
Method
from_file
(cls, path, encoding="utf-8", parse: Union[bool, str] = True, **kwargs)
src/langtorch/tensors/texttensor.py:483
Method
from_pandoc_json
Creates a Text object from a Pandoc AST JSON string.
src/langtorch/texts/text.py:736
Function
full
(shape, text_entry, **kwargs)
src/langtorch/utils.py:20
Function
full_like
(other, text_entry, **kwargs)
src/langtorch/utils.py:27
Method
generate_nested_keys
puts each item onto a nested tuple of keys
src/langtorch/texts/text.py:430
Function
generate_schema_from_function
(function: Any, parameter_details: Dict[str, Dict[str, Any]] = None, hide_de
src/langtorch/api/tools.py:89
Function
get_or_create_eventloop
()
src/langtorch/api/TODO_assistant.py:8
Function
get_or_create_eventloop
()
src/langtorch/api/call.py:13
Method
get_subitems
Helper function to recursively get items, given a list of nested keys. :param items: The list of items to sea
src/langtorch/texts/text.py:412
Method
get_tensor_metadata
(self)
src/langtorch/session.py:330
Function
grad_worker_func
The function that each worker thread runs in the parallel backward. Args: queue: The queue of nodes to process in the computational
src/langtorch/autograd/autograd.py:10
Method
guess_language
(cls, text)
src/langtorch/texts/text.py:822
Method
headers_to_keys
Removes headers entries of the MarkdownTensor and places them as keys of their following paragraphs. If multiple header levels are pr
src/langtorch/tensors/markdowntensor.py:22
Function
hstack
(input: TextTensor, *args, **kwargs)
src/langtorch/_VariableFunctions.py:208
Method
identity
(self)
src/langtorch/texts/text.py:225
Method
iloc
Provides index-based indexing for TextTensor, leveraging the `iloc` method of the Text entries. You can access and manipulate sub-ele
src/langtorch/tensors/texttensor.py:439
Method
iloc
Index-based indexing. You can access entries with nested keys using dot notation, e.g. .loc["key1.key2"]
src/langtorch/texts/text.py:331
Method
input_formatter
(cls, content)
src/langtorch/tensors/codetensor.py:21
Method
input_formatter
(cls, content)
src/langtorch/tensors/chattensor.py:11
Method
inspect
(self)
src/langtorch/tensors/texttensor.py:642
Method
inspect
(self)
src/langtorch/texts/text.py:726
Method
is_shared
(self)
src/langtorch/types.py:34
Function
is_valid_tree
Checks if an entry is a valid tree for a Text instance.
src/langtorch/grammars/text_content_ast.py:121
Method
item_to_tt
(cls, k, v, parse)
src/langtorch/tensors/texttensor.py:187
Function
iter_subarrays
(arr, dim)
src/langtorch/utils.py:46
Method
keep_history_hook
(module, input, output)
src/langtorch/tt/modules/to_tt/activation.py:126
Method
keyed_print
Prints the Text instance with keys aligned over their corresponding values.
src/langtorch/texts/text.py:179
Function
langtorch_parser
(txt)
src/langtorch/grammars/parsers.py:19
Method
linter
(cls, tensor)
src/langtorch/tensors/chattensor.py:22
Method
loc
Provides key-based indexing for TextTensor, leveraging the `loc` method of the Text entries. You can access and manipulate sub-elemen
src/langtorch/tensors/texttensor.py:415
Method
loc
Key-based indexing. You can access entries with nested keys using dot notation, e.g. .loc["key1.key2"]
src/langtorch/texts/text.py:392
Method
lower
(self)
src/langtorch/texts/text.py:732
Method
mT
(self)
src/langtorch/tensors/texttensor.py:883
Function
make_grads
(outputs: Sequence[torch.Tensor], grads: Sequence[_OptionalTensor], is_grads_batched: bool)
src/langtorch/utils.py:103
Method
match_mul_rule
(k, v, k_, v_, i, result, formatted_indices, indices_to_delete)
src/langtorch/texts/text.py:592
Function
mean
(input: TextTensor, definition: str = "a text that is of similar length to the entries, synthesises c
src/langtorch/semantic_algebra.py:17
Method
metadata
(self)
src/langtorch/tensors/texttensor.py:567
Method
nbytes
(self)
src/langtorch/types.py:40
Function
override
(func)
src/langtorch/api/utils.py:5
Function
pad_sequences_and_create_masks
(token_lists)
src/langtorch/utils.py:197
Function
pandoc_to_ast_from_file
Converts a given file into a Pandoc AST JSON format. Args: file_path (str): The path to the file to be converted. Returns:
src/langtorch/grammars/pandoc.py:132
Function
parse_content
(content, parser)
src/langtorch/grammars/text_content_ast.py:11
Method
path
(self)
src/langtorch/session.py:162
Function
positive_indices
Change negative to positive indices, handling newaxis (None) and slices. Parameters: - indices: a tuple containing integer indices, slic
src/langtorch/utils.py:151
Method
pre_forward_hook
(module, input: List[TextTensor])
src/langtorch/tt/modules/to_tt/textmodule.py:78
Function
print_schema
(dictionary)
src/langtorch/api/tools.py:7
Function
process_api_requests_from_file
Processes API requests in parallel, throttling to stay under rate limits.
src/langtorch/api/TODO_gcp.py:13
Method
prompt
(self)
src/langtorch/tt/modules/to_tt/textmodule.py:94
Method
prompts
(self, ids)
src/langtorch/session.py:212
Method
property_func
(self)
src/langtorch/session.py:306
Method
reduction_hook
(module, input, loss)
src/langtorch/tt/modules/to_tt/loss.py:22
Method
reload
(self)
src/langtorch/session.py:165
Method
replace_tuple_with_ttype
(tpl)
src/langtorch/tensors/texttensor.py:115
Function
reshape
(input: TextTensor, *args, **kwargs)
src/langtorch/_VariableFunctions.py:194
Function
revise_your_answer
Agent decides to revise their answer based on the other agent's response. Parameters: thought (str): The internal thought process
src/langtorch/api/tools.py:151
Function
run_backward
Run the backward pass using the execution engine. Args: tensors: List of tensors for which to compute gradients. grad_tensor
src/langtorch/autograd/autograd.py:64
Method
save
(self, path: str)
src/langtorch/texts/text.py:844
Function
set_defaults_from_ctx
Use this decorator to set args with the value "default" to values from the context configuration. Example: @set_defaults_from_ctx
src/langtorch/decorators.py:10
Method
set_key_
(self, keys)
src/langtorch/tensors/texttensor.py:526
Method
share_memory_
(self)
src/langtorch/types.py:37
Method
sort_key
(index)
src/langtorch/texts/text.py:674
Method
split
Return a new TextTensor, with an additional first dimension to split everything using sep as the delimiter. sep The de
src/langtorch/tensors/texttensor.py:996
Function
squeeze
(input: TextTensor, *args, **kwargs)
src/langtorch/_VariableFunctions.py:186
Method
step
Perform a single optimization step. This method updates the parameters of the optimizer by generating new text using the engine and u
src/langtorch/optim/optimizer.py:108
Method
str_formatter
(cls, instance)
src/langtorch/texts/thread.py:8
Method
str_formatter
(cls, instance)
src/langtorch/texts/code.py:8
Function
swapaxes
(input: TextTensor, *args, **kwargs)
src/langtorch/_VariableFunctions.py:198
Function
tensor_or_tensors_to_tuple
(tensors: Optional[_TensorOrTensors], length: int)
src/langtorch/torch_utils.py:9
Function
tensor_or_tensors_to_tuple
(tensors: Optional[_TensorOrTensors], length: int)
src/langtorch/utils.py:59
← previous
next →
301–400 of 413, ranked by callers