Improve model card with description, links, and sample usage

#1
by nielsr HF Staff - opened
Files changed (1) hide show
  1. README.md +24 -3
README.md CHANGED
@@ -1,10 +1,31 @@
1
  ---
2
- library_name: transformers
3
- license: llama3.2
4
  base_model: meta-llama/Llama-3.2-1B-Instruct
5
  datasets:
6
  - whynlp/gsm8k-aug
 
 
 
7
  tags: []
8
  ---
9
 
10
- Built with Llama
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
 
 
2
  base_model: meta-llama/Llama-3.2-1B-Instruct
3
  datasets:
4
  - whynlp/gsm8k-aug
5
+ library_name: transformers
6
+ license: llama3.2
7
+ pipeline_tag: text-generation
8
  tags: []
9
  ---
10
 
11
+ # Llama-adaLR-model-latent-6: Learning When to Stop: Adaptive Latent Reasoning via Reinforcement Learning
12
+
13
+ This repository contains the `Llama-adaLR-model-latent-6` model, presented in the paper "[Learning When to Stop: Adaptive Latent Reasoning via Reinforcement Learning](https://huggingface.co/papers/2511.21581)".
14
+
15
+ This model introduces adaptive-length latent reasoning, a novel approach to optimizing the reasoning length of Transformer language models. By leveraging a post-SFT reinforcement-learning methodology, it aims to minimize reasoning length while maintaining accuracy. Experiments on the Llama 3.2 1B model and the GSM8K-Aug dataset demonstrated a 52% drop in total reasoning length without sacrificing accuracy.
16
+
17
+ For more details, including additional model weights and ongoing developments, please refer to the official [GitHub repository](https://github.com/apning/adaptive-latent-reasoning).
18
+
19
+ ## Sample Usage
20
+
21
+ You can load these models using the function `automodelforcausallm_from_pretrained_latent` from `src.model_creation` with the `transformers` library, as shown in the following example found in the GitHub repository:
22
+
23
+ ```python
24
+ from transformers import AutoTokenizer
25
+ from src.model_creation import automodelforcausallm_from_pretrained_latent
26
+
27
+ repo_id = "Lapisbird/Llama-adaLR-model-latent-6"
28
+
29
+ model = automodelforcausallm_from_pretrained_latent(repo_id)
30
+ tokenizer = AutoTokenizer.from_pretrained(repo_id)
31
+ ```