Run this model with HF Jobs
Run Lapisbird/Llama-adaLR-appendix-model-meaned_codi on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/Lapisbird/Llama-adaLR-appendix-model-meaned_codi. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/Lapisbird/Llama-adaLR-appendix-model-meaned_codi on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Instructions to use Lapisbird/Llama-adaLR-appendix-model-meaned_codi with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Lapisbird/Llama-adaLR-appendix-model-meaned_codi with Transformers:
# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModel tokenizer = AutoTokenizer.from_pretrained("Lapisbird/Llama-adaLR-appendix-model-meaned_codi") model = AutoModel.from_pretrained("Lapisbird/Llama-adaLR-appendix-model-meaned_codi", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Improve model card: Add paper link, code link, pipeline tag, and sample usage
#1
by nielsr HF Staff - opened
12345678910---library_name: transformerslicense: llama3.2base_model: meta-llama/Llama-3.2-1B-Instructdatasets:- whynlp/gsm8k-augtags: []---Built with Llama12345678910111213141516171819202122232425262728293031323334353637383940---base_model: meta-llama/Llama-3.2-1B-Instructdatasets:- whynlp/gsm8k-auglibrary_name: transformerslicense: llama3.2tags: []pipeline_tag: text-generation---# Learning When to Stop: Adaptive Latent Reasoning via Reinforcement LearningThis repository contains the weights for **Adaptive Latent Reasoning models**, as introduced in the paper [Learning When to Stop: Adaptive Latent Reasoning via Reinforcement Learning](https://huggingface.co/papers/2511.21581).Latent reasoning represents a new development in Transformer language models that has shown potential in compressing reasoning lengths compared to chain-of-thought reasoning. This work develops adaptive-length latent reasoning models and introduces a post-SFT reinforcement-learning methodology to optimize latent reasoning length by minimizing reasoning length while maintaining accuracy. Experiments on the Llama 3.2 1B model and the GSM8K-Aug dataset showed a 52% drop in total reasoning length with no penalty to accuracy.The official code and pretrained weights are available at the GitHub repository: https://github.com/apning/adaptive-latent-reasoning## UsageAll weights used for results in the paper are available on Hugging Face. You can load these models using the function `automodelforcausallm_from_pretrained_latent` from `src.model_creation`.First, set up your environment by cloning the repository and installing dependencies:```bashgit clone https://github.com/apning/adaptive-latent-reasoning.gitcd adaptive-latent-reasoningconda env create -f environment.yml && conda activate adaptive-latent-reasoning```Then, you can load a model like this:```pythonfrom transformers import AutoTokenizerfrom src.model_creation import automodelforcausallm_from_pretrained_latentrepo_id = "Lapisbird/Llama-adaLR-model-latent-6" # Example model from the papermodel = automodelforcausallm_from_pretrained_latent(repo_id)tokenizer = AutoTokenizer.from_pretrained(repo_id)```For more detailed instructions on replication, training, and evaluation, please refer to the [official GitHub repository](https://github.com/apning/adaptive-latent-reasoning).
README.md+33-3