Text Generation
PEFT
Safetensors
Transformers
lora
interpretability
nla
activation-verbalizer
grpo
reinforcement-learning
conversational
Instructions to use anicka/nla-phi4-av-arnative-grpo with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use anicka/nla-phi4-av-arnative-grpo with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("microsoft/phi-4") model = PeftModel.from_pretrained(base_model, "anicka/nla-phi4-av-arnative-grpo") - Transformers
How to use anicka/nla-phi4-av-arnative-grpo with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="anicka/nla-phi4-av-arnative-grpo") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("anicka/nla-phi4-av-arnative-grpo", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use anicka/nla-phi4-av-arnative-grpo with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "anicka/nla-phi4-av-arnative-grpo" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "anicka/nla-phi4-av-arnative-grpo", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/anicka/nla-phi4-av-arnative-grpo
- SGLang
How to use anicka/nla-phi4-av-arnative-grpo with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "anicka/nla-phi4-av-arnative-grpo" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "anicka/nla-phi4-av-arnative-grpo", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "anicka/nla-phi4-av-arnative-grpo" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "anicka/nla-phi4-av-arnative-grpo", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use anicka/nla-phi4-av-arnative-grpo with Docker Model Runner:
docker model run hf.co/anicka/nla-phi4-av-arnative-grpo
Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
|
@@ -39,10 +39,10 @@ The supervised adapter scored 0.474 mean-subtracted cosine on round-trip eval
|
|
| 39 |
adapter scores **0.585** — a 23% improvement that closes 77% of the gap to the
|
| 40 |
AR ceiling (0.619).
|
| 41 |
|
| 42 |
-
On
|
| 43 |
-
reconstruct **better than the ground-truth descriptions**
|
| 44 |
-
imitating. The AR-native reward found output patterns
|
| 45 |
-
descriptions never used.
|
| 46 |
|
| 47 |
Qualitative difference: the SL adapter produced descriptions with correct style
|
| 48 |
but vague content ("forward-looking sentiment," "narrative setup"). The GRPO
|
|
@@ -153,7 +153,7 @@ Double-holdout round-trip eval (49 texts unseen by both AV and AR):
|
|
| 153 |
| L38 (96%) | 0.437 | 0.378 | 0.604 |
|
| 154 |
| **Mean** | **0.585** | 0.474 | 0.619 |
|
| 155 |
|
| 156 |
-
On L13
|
| 157 |
patterns that reconstruct better than the human-written targets.
|
| 158 |
|
| 159 |
## Companion models
|
|
|
|
| 39 |
adapter scores **0.585** — a 23% improvement that closes 77% of the gap to the
|
| 40 |
AR ceiling (0.619).
|
| 41 |
|
| 42 |
+
On 2 of 9 evaluation layers (L13, L22), the GRPO adapter produces
|
| 43 |
+
descriptions that reconstruct **better than the ground-truth descriptions**
|
| 44 |
+
the SL adapter was imitating. The AR-native reward found output patterns
|
| 45 |
+
that frontier-LLM descriptions never used.
|
| 46 |
|
| 47 |
Qualitative difference: the SL adapter produced descriptions with correct style
|
| 48 |
but vague content ("forward-looking sentiment," "narrative setup"). The GRPO
|
|
|
|
| 153 |
| L38 (96%) | 0.437 | 0.378 | 0.604 |
|
| 154 |
| **Mean** | **0.585** | 0.474 | 0.619 |
|
| 155 |
|
| 156 |
+
On L13 and L22: GRPO exceeds the GT ceiling — the adapter found description
|
| 157 |
patterns that reconstruct better than the human-written targets.
|
| 158 |
|
| 159 |
## Companion models
|