DEDUPED Hot AI repos. Real use cases. What people build. Get the Monday 5

How to use LLM Legislativo: what you can do with it

What is LLM Legislativo? A Brazilian legislative text corpus from the Câmara dos Deputados and Senado Federal, plus a causal Transformer language model trained from scratch in pure PyTorch.

How do I use it? Clone the repo: (inferred) git clone https://github.com/BaruqueRodrigues/llm-legislativo; then open the model package at src/legislm/model/ and read the causal self-attention, GELU, and weight tying code; read the training code in src/legislm/training/ to see how the loss is divided by the total number of valid targets in an update. Full steps below.

Trended earlier

View repo on GitHub

Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer

Authorization notice. This tool is dual-use. Only use it on software, sites and systems you own or have explicit permission to test, and follow the relevant licenses and terms of service.

4 use cases

  • Study a from-scratch causal Transformer in PyTorch

    Read and test an explicit GPT-style decoder built without pretrained weights or the Hugging Face Trainer.

    View prompt
    Clone https://github.com/BaruqueRodrigues/llm-legislativo and explain how the causal attention and the gradient accumulation loss are implemented in src/legislm/model/ and src/legislm/training/. Output a short summary with file paths and line references. Verify each claim by reading the code, and say so if a file is missing.
  • Load the Brazilian legislative model and generate text

    Download the published safetensors model and tokenizer from Hugging Face and run its inference code.

    View prompt
    Using the repo https://github.com/BaruqueRodrigues/llm-legislativo and the Hugging Face model BaruqRodrigues/llm-legislativo, generate a short Portuguese text starting from the prompt <prompt>. Output the generated text and the exact command used. Verify that the tokenizer round-trips the prompt before generating.
  • Build a Portuguese legislative text dataset

    Load the curated Parquet release with leakage-free train, validation, and test splits for NLP work.

    View prompt
    Load the Hugging Face dataset BaruqRodrigues/corpus-legislativo-pretraining and report the number of rows in the train, validation, and test splits. Output a table of counts and one sample record per split. Verify that no family_id appears in both train and test.
  • Reproduce the byte_nll_v1 evaluation numbers

    Rerun the byte-level NLL protocol on the test split and compare against the reported results.

    View prompt
    In the repo https://github.com/BaruqueRodrigues/llm-legislativo, run the byte_nll_v1 evaluation in src/legislm/evaluation/ on the test split and report nats per byte for the whole set and for the Câmara and Senado subsets. Compare with the README values 0,7297 and 0,8817 and 0,7049. Verify the document and byte counts match 71.069 documents and 482 million bytes.

Quick start with LLM Legislativo

  1. Check you have what it needs: A Python environment (the README install section is cut off in the source, so exact setup steps are unconfirmed); Internet access to Hugging Face Hub and GitHub; Enough disk space for the Parquet release if you download corpus files (the raw TAR archives total over 360 GiB).
  2. Open BaruqueRodrigues/llm-legislativo on GitHub and read the README and license.
  3. Clone the repo: (inferred) git clone https://github.com/BaruqueRodrigues/llm-legislativo (inferred, check the README)
  4. Open the model package at src/legislm/model/ and read the causal self-attention, GELU, and weight tying code.
  5. Read the training code in src/legislm/training/ to see how the loss is divided by the total number of valid targets in an update.
  6. Install the CPU lockfile with pip install -r requirements-cpu.lock and run the tests in tests/ with pytest. (inferred, check the README)

These steps come from our top use case, Study a from-scratch causal Transformer in PyTorch, which also has a copy-paste agent prompt.

Use this in your AI agent

Ask your agent

Using the Deduped MCP, get the setup steps for BaruqueRodrigues/llm-legislativo

Add Deduped to Claude Code once

claude mcp add --transport http deduped https://dedupedai.com/mcp

Cursor, ChatGPT, others

Best AI repos for Research

About this repo

  • Who it is forResearchers, legal-data engineers, and ML students who need open Brazilian legislative text or a readable from-scratch GPT-style model to study or reuse.
  • Why it is hot497 stars, launched 27 days ago, picked up by one AI source we track
  • LanguagePython
  • Sourcegithub.com/BaruqueRodrigues/llm-legislativo · Back to Hot repos

Requirements

  • A Python environment (the README install section is cut off in the source, so exact setup steps are unconfirmed)
  • Internet access to Hugging Face Hub and GitHub
  • Enough disk space for the Parquet release if you download corpus files (the raw TAR archives total over 360 GiB)
  • Basic familiarity with PyTorch and Hugging Face datasets for the model and corpus steps

Add this badge to your README

Maintain LLM Legislativo? Show readers where to find these use cases. Use cases on Deduped

Markdown

[![Use cases on Deduped](https://dedupedai.com/badge/BaruqueRodrigues/llm-legislativo.svg)](https://dedupedai.com/use-cases/baruquerodrigues-llm-legislativo/?utm_source=github&utm_medium=badge&utm_campaign=BaruqueRodrigues-llm-legislativo)

HTML

<a href="https://dedupedai.com/use-cases/baruquerodrigues-llm-legislativo/?utm_source=github&amp;utm_medium=badge&amp;utm_campaign=BaruqueRodrigues-llm-legislativo"><img src="https://dedupedai.com/badge/BaruqueRodrigues/llm-legislativo.svg" alt="Use cases on Deduped" height="20"></a>

A static image, no tracking script. About the badge

Questions about LLM Legislativo

What is LLM Legislativo?

A Brazilian legislative text corpus from the Câmara dos Deputados and Senado Federal, plus a causal Transformer language model trained from scratch in pure PyTorch. It is an open-source project on GitHub: https://github.com/BaruqueRodrigues/llm-legislativo.

How do I use LLM Legislativo?

Clone the repo: (inferred) git clone https://github.com/BaruqueRodrigues/llm-legislativo; then open the model package at src/legislm/model/ and read the causal self-attention, GELU, and weight tying code; read the training code in src/legislm/training/ to see how the loss is divided by the total number of valid targets in an update. The use cases on this page give the full steps and a copy-paste agent prompt for each job.

Who is LLM Legislativo for?

Researchers, legal-data engineers, and ML students who need open Brazilian legislative text or a readable from-scratch GPT-style model to study or reuse.

What can I do with LLM Legislativo?

4 use cases so far, for example: Study a from-scratch causal Transformer in PyTorch; Load the Brazilian legislative model and generate text; Build a Portuguese legislative text dataset. Each has steps and a copy-paste agent prompt.

What do I need to run LLM Legislativo?

A Python environment (the README install section is cut off in the source, so exact setup steps are unconfirmed); Internet access to Hugging Face Hub and GitHub; Enough disk space for the Parquet release if you download corpus files (the raw TAR archives total over 360 GiB); Basic familiarity with PyTorch and Hugging Face datasets for the model and corpus steps.

What are alternatives to LLM Legislativo?

Other hot AI repos in Research: Deep Tutor, Local Deep Research, Project Nomad, Nanochat, We Knora.

Is LLM Legislativo safe to run?

Deduped does not own, audit or vouch for it. Read the README and license, run it on your own systems first and review every command before you run it.