ggfm.models.LLAGA

class ggfm.models.LLAGA(args, **kwargs)[source]

“LLaGA: Large Language and Graph Assistant” paper.

Parameters:
  • model (class:ggfm.models) – The used model.

  • tokenizer (transformers.AutoTokenizer) – The tokenizer.

  • device (int) – Device

property device
encode_graphs(samples)[source]
forward(samples)[source]

Defines the computation performed at every call.

Should be overridden by all subclasses.

Note

Although the recipe for forward pass needs to be defined within this function, one should call the Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

inference(samples)[source]
maybe_autocast(dtype=torch.bfloat16)[source]
print_trainable_params()[source]
training: bool