Text Generation
Transformers
Safetensors
English
lam
memory
long-term-memory
retrieval-augmented-generation
qlora
abstention
hallucination-reduction
locomo
longmemeval
conversational
custom_code
Eval Results (legacy)
Instructions to use Akhrots/LAM8B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Akhrots/LAM8B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Akhrots/LAM8B", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("Akhrots/LAM8B", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Akhrots/LAM8B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Akhrots/LAM8B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Akhrots/LAM8B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Akhrots/LAM8B
- SGLang
How to use Akhrots/LAM8B 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 "Akhrots/LAM8B" \ --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": "Akhrots/LAM8B", "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 "Akhrots/LAM8B" \ --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": "Akhrots/LAM8B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use Akhrots/LAM8B with Docker Model Runner:
docker model run hf.co/Akhrots/LAM8B
docs: LAM8B branding + full eval metrics (base vs FT)
Browse files
README.md
CHANGED
|
@@ -1,6 +1,5 @@
|
|
| 1 |
---
|
| 2 |
license: apache-2.0
|
| 3 |
-
base_model: Qwen/Qwen3-8B
|
| 4 |
library_name: transformers
|
| 5 |
pipeline_tag: text-generation
|
| 6 |
thumbnail: https://huggingface.co/Akhrots/LAM8B/resolve/main/logo.png
|
|
@@ -15,7 +14,6 @@ tags:
|
|
| 15 |
- hallucination-reduction
|
| 16 |
- locomo
|
| 17 |
- longmemeval
|
| 18 |
-
- qwen3
|
| 19 |
datasets:
|
| 20 |
- snap-research/locomo
|
| 21 |
- xiaowu0162/longmemeval
|
|
@@ -103,7 +101,7 @@ model-index:
|
|
| 103 |
</p>
|
| 104 |
|
| 105 |
<p align="center">
|
| 106 |
-
<img src="https://img.shields.io/badge/
|
| 107 |
<img src="https://img.shields.io/badge/license-Apache_2.0-00B4D8?style=flat-square&labelColor=101010" alt="Apache 2.0">
|
| 108 |
<img src="https://img.shields.io/badge/QLoRA-r32_·_α64-FFD60A?style=flat-square&labelColor=101010" alt="QLoRA r32 alpha64">
|
| 109 |
<img src="https://img.shields.io/badge/trained_on-1×_T4_😭-EF476F?style=flat-square&labelColor=101010" alt="1x T4">
|
|
@@ -133,7 +131,7 @@ that second half is the whole point. ⬇️
|
|
| 133 |
|
| 134 |
same prompts, same decoding, same harness. **only the weights changed.**
|
| 135 |
|
| 136 |
-
| metric |
|
| 137 |
|:--|:--|:--|:--|
|
| 138 |
| **token F1** | `█████░░░░░░░` 0.376 | `███████░░░░░` **0.606** | 🟢 **+61%** |
|
| 139 |
| **exact match** | `██░░░░░░░░░░` 0.177 | `████░░░░░░░░` **0.353** | 🟢 **2.0×** |
|
|
@@ -150,7 +148,7 @@ same prompts, same decoding, same harness. **only the weights changed.**
|
|
| 150 |
|
| 151 |
## 🎯 the party trick: it shuts up when it should
|
| 152 |
|
| 153 |
-
here's the trap.
|
| 154 |
|
| 155 |
> **precision is 37.8%.** it refuses *constantly*. so of course it catches the real gaps — it's refusing everything. **115 out of 544 questions it could have answered, it didn't.** that's not "safe." that's a model that shrugs at you.
|
| 156 |
|
|
@@ -278,7 +276,7 @@ vllm serve Akhrots/LAM8B --served-model-name lam8b --trust-remote-code
|
|
| 278 |
|
| 279 |
**1. the prompt is load-bearing.** system prompt, `[id] (time via source)` memory format, and the exact abstention string `I don't have that in your memory.` are all part of the trained contract. drift the prompt → quality drops silently, no error.
|
| 280 |
|
| 281 |
-
**2. thinking stays OFF.**
|
| 282 |
|
| 283 |
### 🧰 four tasks, one model
|
| 284 |
|
|
@@ -300,7 +298,7 @@ vllm serve Akhrots/LAM8B --served-model-name lam8b --trust-remote-code
|
|
| 300 |
|
| 301 |
| | |
|
| 302 |
|:--|:--|
|
| 303 |
-
| base |
|
| 304 |
| method | QLoRA, 4-bit NF4, fp16 compute |
|
| 305 |
| LoRA r / α / dropout | **32 / 64 / 0.05** |
|
| 306 |
| target modules | `q,k,v,o,gate,up,down_proj` (all of them) |
|
|
@@ -336,7 +334,7 @@ deterministic, lexical, no LLM judge, no API key — reproducible and free.
|
|
| 336 |
|
| 337 |
- **token F1 / EM** after normalization (lowercase, strip articles + punctuation)
|
| 338 |
- **abstention P/R** matched against the exact contract string, case- and trailing-period-insensitive
|
| 339 |
-
- **contract validity** = fraction of outputs parsing against their task schema. both models hit **1.000** — base
|
| 340 |
- test file is **shuffled before slicing** (it's concatenated by source, so slicing raw would make every per-category number a lie)
|
| 341 |
|
| 342 |
```bash
|
|
@@ -369,7 +367,7 @@ no model card should be all W's. here are the L's, on the record:
|
|
| 369 |
|
| 370 |
## 📜 license & credits
|
| 371 |
|
| 372 |
-
**Apache-2.0**
|
| 373 |
|
| 374 |
```bibtex
|
| 375 |
@misc{lam8b,
|
|
@@ -381,7 +379,7 @@ no model card should be all W's. here are the L's, on the record:
|
|
| 381 |
```
|
| 382 |
|
| 383 |
<p align="center">
|
| 384 |
-
<sub>
|
| 385 |
</p>
|
| 386 |
|
| 387 |
<p align="center">
|
|
|
|
| 1 |
---
|
| 2 |
license: apache-2.0
|
|
|
|
| 3 |
library_name: transformers
|
| 4 |
pipeline_tag: text-generation
|
| 5 |
thumbnail: https://huggingface.co/Akhrots/LAM8B/resolve/main/logo.png
|
|
|
|
| 14 |
- hallucination-reduction
|
| 15 |
- locomo
|
| 16 |
- longmemeval
|
|
|
|
| 17 |
datasets:
|
| 18 |
- snap-research/locomo
|
| 19 |
- xiaowu0162/longmemeval
|
|
|
|
| 101 |
</p>
|
| 102 |
|
| 103 |
<p align="center">
|
| 104 |
+
<img src="https://img.shields.io/badge/params-8B-FF6B00?style=flat-square&labelColor=101010" alt="8B params">
|
| 105 |
<img src="https://img.shields.io/badge/license-Apache_2.0-00B4D8?style=flat-square&labelColor=101010" alt="Apache 2.0">
|
| 106 |
<img src="https://img.shields.io/badge/QLoRA-r32_·_α64-FFD60A?style=flat-square&labelColor=101010" alt="QLoRA r32 alpha64">
|
| 107 |
<img src="https://img.shields.io/badge/trained_on-1×_T4_😭-EF476F?style=flat-square&labelColor=101010" alt="1x T4">
|
|
|
|
| 131 |
|
| 132 |
same prompts, same decoding, same harness. **only the weights changed.**
|
| 133 |
|
| 134 |
+
| metric | un-tuned base | **LAM8B** | |
|
| 135 |
|:--|:--|:--|:--|
|
| 136 |
| **token F1** | `█████░░░░░░░` 0.376 | `███████░░░░░` **0.606** | 🟢 **+61%** |
|
| 137 |
| **exact match** | `██░░░░░░░░░░` 0.177 | `████░░░░░░░░` **0.353** | 🟢 **2.0×** |
|
|
|
|
| 148 |
|
| 149 |
## 🎯 the party trick: it shuts up when it should
|
| 150 |
|
| 151 |
+
here's the trap. the un-tuned base has **94.6% abstention recall** — it catches almost every unanswerable question. sounds elite. it is not.
|
| 152 |
|
| 153 |
> **precision is 37.8%.** it refuses *constantly*. so of course it catches the real gaps — it's refusing everything. **115 out of 544 questions it could have answered, it didn't.** that's not "safe." that's a model that shrugs at you.
|
| 154 |
|
|
|
|
| 276 |
|
| 277 |
**1. the prompt is load-bearing.** system prompt, `[id] (time via source)` memory format, and the exact abstention string `I don't have that in your memory.` are all part of the trained contract. drift the prompt → quality drops silently, no error.
|
| 278 |
|
| 279 |
+
**2. thinking stays OFF.** LAM8B is a hybrid-thinking architecture and was trained with `enable_thinking=False`. flip it on at serve time and you're measuring a different model than the one that was trained.
|
| 280 |
|
| 281 |
### 🧰 four tasks, one model
|
| 282 |
|
|
|
|
| 298 |
|
| 299 |
| | |
|
| 300 |
|:--|:--|
|
| 301 |
+
| base | open Apache-2.0 weights |
|
| 302 |
| method | QLoRA, 4-bit NF4, fp16 compute |
|
| 303 |
| LoRA r / α / dropout | **32 / 64 / 0.05** |
|
| 304 |
| target modules | `q,k,v,o,gate,up,down_proj` (all of them) |
|
|
|
|
| 334 |
|
| 335 |
- **token F1 / EM** after normalization (lowercase, strip articles + punctuation)
|
| 336 |
- **abstention P/R** matched against the exact contract string, case- and trailing-period-insensitive
|
| 337 |
+
- **contract validity** = fraction of outputs parsing against their task schema. both models hit **1.000** — the base model's problem is content, not format
|
| 338 |
- test file is **shuffled before slicing** (it's concatenated by source, so slicing raw would make every per-category number a lie)
|
| 339 |
|
| 340 |
```bash
|
|
|
|
| 367 |
|
| 368 |
## 📜 license & credits
|
| 369 |
|
| 370 |
+
**Apache-2.0**. LAM8B is a fine-tune of open, Apache-2.0-licensed weights and the derivative is released under the same license. training data is synthetic + [LoCoMo](https://github.com/snap-research/locomo) + [LongMemEval](https://github.com/xiaowu0162/LongMemEval) (MIT).
|
| 371 |
|
| 372 |
```bibtex
|
| 373 |
@misc{lam8b,
|
|
|
|
| 379 |
```
|
| 380 |
|
| 381 |
<p align="center">
|
| 382 |
+
<sub>one T4 · zero GPU budget 🐏</sub>
|
| 383 |
</p>
|
| 384 |
|
| 385 |
<p align="center">
|