Improve model card: Add pipeline tag, paper link, code link, and usage example

#1
by nielsr HF Staff - opened
Files changed (1) hide show
  1. README.md +30 -3
README.md CHANGED
@@ -1,10 +1,37 @@
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
+ # Learning When to Stop: Adaptive Latent Reasoning via Reinforcement Learning
12
+
13
+ This repository hosts a model presented in the paper "[Learning When to Stop: Adaptive Latent Reasoning via Reinforcement Learning](https://huggingface.co/papers/2511.21581)".
14
+
15
+ Latent reasoning is a novel development in Transformer language models that compresses reasoning lengths by directly passing information-rich previous final latent states. This model implements an adaptive-length latent reasoning approach optimized via a post-SFT reinforcement-learning methodology. This optimization minimizes reasoning length while maintaining accuracy, demonstrating a 52% drop in total reasoning length with no penalty to accuracy on the Llama 3.2 1B model and the GSM8K-Aug dataset.
16
+
17
+ - **Paper**: [Learning When to Stop: Adaptive Latent Reasoning via Reinforcement Learning](https://huggingface.co/papers/2511.21581)
18
+ - **Code**: [https://github.com/apning/adaptive-latent-reasoning](https://github.com/apning/adaptive-latent-reasoning)
19
+
20
+ ## Sample Usage
21
+
22
+ You can load this model and other trained weights using the `automodelforcausallm_from_pretrained_latent` function from `src.model_creation`, as demonstrated in the official GitHub repository:
23
+
24
+ ```python
25
+ from transformers import AutoTokenizer
26
+ # For full functionality, clone the official GitHub repo: https://github.com/apning/adaptive-latent-reasoning
27
+ # and ensure 'src.model_creation' is in your Python path or adapt the import.
28
+ from src.model_creation import automodelforcausallm_from_pretrained_latent
29
+
30
+ repo_id = "Lapisbird/Llama-adaLR-model-latent-6" # Example repo_id from the paper's GitHub README
31
+
32
+ model = automodelforcausallm_from_pretrained_latent(repo_id)
33
+ tokenizer = AutoTokenizer.from_pretrained(repo_id)
34
+
35
+ print(f"Model '{repo_id}' and tokenizer loaded successfully.")
36
+ # You can now use 'model' and 'tokenizer' for inference as described in the paper.
37
+ ```