MCPcopy Create free account

hub / github.com/AdamSobieszek/langtorch / functions

Functions413 in github.com/AdamSobieszek/langtorch

Method__len__
(self)
src/langtorch/texts/text.py:514
Method__matmul__
(self, other)
src/langtorch/tensors/texttensor.py:724
Method__mul__
(self, other)
src/langtorch/tensors/texttensor.py:716
Method__ne__
(self, other)
src/langtorch/tensors/texttensor.py:655
Method__new__
(cls, content="", *args, **kwargs)
src/langtorch/tensors/chattensor.py:37
Method__new__
(cls, *args, parse=True, **kwargs)
src/langtorch/tensors/losstensor.py:8
Method__new__
Construct a new Text instance. Allows for various input formats. Args: *substrings (Union[str,Tuple[str, str], List[str]
src/langtorch/texts/text.py:82
Method__new__
(cls, *substrings, parse="xml", language="xml", **kwargs)
src/langtorch/texts/xml.py:9
Method__new__
(cls, content)
src/langtorch/texts/chat.py:22
Method__new__
(cls, content)
src/langtorch/texts/chat.py:33
Method__new__
(cls, *substrings, parse="md", language="md", **kwargs)
src/langtorch/texts/markdown.py:10
Method__or__
(self, other)
src/langtorch/texts/text.py:511
Method__pow__
(self, power)
src/langtorch/tensors/texttensor.py:700
Method__pow__
(self, power)
src/langtorch/texts/text.py:700
Method__repr__
(self)
src/langtorch/session.py:323
Method__repr__
(self)
src/langtorch/tensors/texttensor.py:636
Method__repr__
(self)
src/langtorch/tensors/texttensor.py:765
Method__repr__
(self)
src/langtorch/texts/text.py:211
Method__setattr__
(self, name, value, save=True)
src/langtorch/session.py:140
Method__setitem__
(self, key, value)
src/langtorch/session.py:316
Method__setitem__
(self, key, value)
src/langtorch/tensors/texttensor.py:430
Method__setitem__
(self, index, value)
src/langtorch/tensors/texttensor.py:454
Method__setitem__
Sets the item at the specified index to value. If embeddings are present, they are invalidated for the modified entries. Parameters:
src/langtorch/tensors/texttensor.py:833
Method__setitem__
(self, index, value)
src/langtorch/texts/text.py:363
Method__setitem__
Set or update item(s) in the TextTensor. :param key: A string or list of strings representing keys. :
src/langtorch/texts/text.py:446
Method__setstate__
(self, state)
src/langtorch/tt/modules/to_tt/conv.py:135
Method__setstate__
(self, state)
src/langtorch/tt/modules/to_tt/activation.py:256
Method__str__
(self)
src/langtorch/texts/text.py:140
Method__str__
(self)
src/langtorch/texts/chat.py:8
Method__str__
(self)
src/langtorch/texts/chat.py:16
Method__torch_function__
(cls, func: Callable, types: Iterable, args=(), kwargs=None)
src/langtorch/tensors/texttensor.py:345
Function_calculate_shape
(output: torch.Tensor, grad: torch.Tensor, is_grads_batched: bool)
src/langtorch/utils.py:87
Method_conv_forward
(self, input: TextTensor, weight: TextTensor, bias: Optional[Tensor])
src/langtorch/tt/modules/to_tt/conv.py:19
Method_delete
(self)
src/langtorch/session.py:326
Method_execute_code
(self, code_entry, namespace_entry, queue)
src/langtorch/tensors/codetensor.py:38
Method_get_name
(self)
src/langtorch/tt/modules/to_tt/textmodule.py:141
Method_input_formatter
(cls, instance)
src/langtorch/texts/code.py:12
Method_new_shared
(self, int)
src/langtorch/types.py:25
Method_new_with_file
(self, f: Any, element_size: int)
src/langtorch/types.py:52
Function_numpy_object_pad
Pad a numpy array with object type dtype. :param input_array: Array to be padded, of object type. :param pad: Tuple of int pairs to pad
src/langtorch/tt/functional.py:8
Method_to_ast
(cls, content, parser=False, is_tuple=True)
src/langtorch/texts/string.py:13
Method_write_file
(self, f: Any, is_real_file: _bool, save_size: _bool, element_size: int)
src/langtorch/types.py:28
Methodactivation_and_key_hook
(module, input, output)
src/langtorch/tt/modules/to_tt/textmodule.py:83
Methodadd_key_
(self, keys)
src/langtorch/tensors/texttensor.py:541
Methodadd_param_group
Add a parameter group to the Optimizer's param_groups. This would be overridden only if we need to enforce specific types within param groups
src/langtorch/optim/optimizer.py:46
Methodappend_spaces_to_duplicates
(strings)
src/langtorch/session.py:169
Functionappend_to_jsonl
Append a json payload to the end of a jsonl file.
src/langtorch/api/parallel_processor_utils.py:132
Methodapply_embed
(tensor, model=None)
src/langtorch/tensors/texttensor.py:391
Functionapply_rotary_embeddings
Apply rotary embeddings to the input tensors x. Args: - x (torch.Tensor): The input tensors of shape (batch_size, seq_len, dim). - m
src/langtorch/methods/embeddings.py:6
Methodapply_to_texttensors
(func, args, kwargs)
src/langtorch/tensors/texttensor.py:371
Functionauth
Authenticates with the OpenAI API by setting the API key either directly or by reading from a file. Parameters: key_or_path (str, op
src/langtorch/api/call.py:33
Methodbackward
r"""See. docs
src/langtorch/tensors/texttensor.py:1034
Methodbackward
(ctx, grad_output)
src/langtorch/tt/functional.py:80
Methodbackward
(ctx, grad_output)
src/langtorch/tt/functional.py:106
Methodbackward
(ctx, grad_output)
src/langtorch/tt/functional.py:133
Methodbackward
(ctx, grad_output)
src/langtorch/tt/functional.py:157
Methodbackward
(ctx, grad_output)
src/langtorch/tt/functional.py:195
Methodbackward
(ctx, grad_output)
src/langtorch/tt/functional.py:239
Methodbackward
(ctx, grad_output)
src/langtorch/tt/functional.py:259
Methodbackward
(ctx, grad_output)
src/langtorch/tt/functional.py:274
Methodbackward
(ctx, grad_output)
src/langtorch/tt/functional.py:312
Methodbackward
(ctx, grad_output)
src/langtorch/tt/functional.py:335
Methodbackward
(ctx, grad_output)
src/langtorch/tt/functional.py:348
Methodbackward
(ctx, grad_output)
src/langtorch/tt/functional.py:414
Methodbackward
(ctx, grad_output)
src/langtorch/tt/modules/to_tt/loss.py:41
Methodbackward
(ctx, grad_output)
src/langtorch/tt/modules/to_tt/activation.py:63
Methodbackward_through_llm_base
(cls, variables, response, prompt, system_prompt, backward_engine)
src/langtorch/autograd/backward_activation.py:75
Methodbackward_through_llm_chain
(cls, variables, response, prompt, system_prompt, backward_engine)
src/langtorch/autograd/backward_activation.py:71
Functioncall
Sending a single system message prompt to get a response. Parameters: prompt (str): The input message to send to the model.
src/langtorch/api/call.py:78
Methodcall_api
Calls the OpenAI API and saves results.
src/langtorch/api/parallel_processor_utils.py:66
Methodcfg
(self)
src/langtorch/session.py:271
Methodchange_content_tuple
Helper function to set items in a tuple. :param tup: The tuple to update. :param keys: Th
src/langtorch/texts/text.py:455
Functionconcat
concat(texttensors, dim=0, *, out=None) -> TextTensor Concatenates a sequence of tensors along an existing dimension. All tensors need
src/langtorch/_VariableFunctions.py:104
Methodconfig
(self)
src/langtorch/session.py:267
Methodconstructors
(*args, parse=False)
src/langtorch/texts/string.py:9
Methodcontent
(self)
src/langtorch/tensors/texttensor.py:220
Methodcontent
(self)
src/langtorch/texts/text.py:229
Methodcontent
(self)
src/langtorch/tt/modules/to_tt/textmodule.py:105
Functioncosine_similarity
(x1: TextTensor, x2: TextTensor, dim: int = -1, eps: float = 1e-8)
src/langtorch/_VariableFunctions.py:172
Methodcreate_property
(path)
src/langtorch/session.py:305
Methoddata_ptr
(self)
src/langtorch/types.py:46
Methoddel_ind
(subresult, index)
src/langtorch/texts/text.py:664
Methoddict_to_ast
(cls, dicts)
src/langtorch/texts/text.py:787
Functiondropout
r""" During training, randomly zeroes some of the elements of the input tensor with probability :attr:`p` using samples from a Bernoulli d
src/langtorch/tt/functional.py:200
Methodelement_size
(self)
src/langtorch/types.py:31
Methodembedding
(self)
src/langtorch/tensors/texttensor.py:238
Methodembedding_model
(self)
src/langtorch/tensors/texttensor.py:229
Methodembeddings
(self)
src/langtorch/tensors/texttensor.py:259
Functioneval_sample
(item, eval_fn, model)
evaluation/prompt_optimization.py:38
Methodexpand_as
(self, other)
src/langtorch/tensors/texttensor.py:962
Methodextra_repr
(self)
src/langtorch/tt/modules/to_tt/textmodule.py:147
Methodextra_repr
(self)
src/langtorch/tt/modules/to_tt/activation.py:139
Functionf_concatenate_terminals
(instance: 'Text')
src/langtorch/grammars/formatters.py:22
Functionf_markdown
(instance: 'Text')
src/langtorch/grammars/formatters.py:9
Functionf_xml
(instance: 'Text')
src/langtorch/grammars/formatters.py:18
Methodflatten_keys
(parent_key, value, sep='.', iterate=False)
src/langtorch/texts/text.py:575
Functionformat
(text, *args, **kwargs)
src/langtorch/tt/functional.py:170
Methodformat
Return a formatted version of self, using substitutions from kwargs. The substitutions are identified by braces ('{' and '}').
src/langtorch/tensors/texttensor.py:690
Methodforward
Processes the given TextTensor input and returns a TextTensor output. Parameters: - input_texttensor (TextTensor): Input dat
src/langtorch/decorators.py:71
Methodforward
Processes the given TextTensor input and returns a torch.Tensor output. Parameters: - input_texttensor (TextTensor): Input d
src/langtorch/decorators.py:110
← previousnext →201–300 of 413, ranked by callers