Text Generation
Transformers
Safetensors
English
gemma3_text
gemma3
causal-lm
1m-context
symbiogenesis
episodic-memory
conversational
text-generation-inference
Instructions to use MonumentalSystems/Ouroboros-1MContext-Gemma-270m with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use MonumentalSystems/Ouroboros-1MContext-Gemma-270m with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="MonumentalSystems/Ouroboros-1MContext-Gemma-270m") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("MonumentalSystems/Ouroboros-1MContext-Gemma-270m") model = AutoModelForCausalLM.from_pretrained("MonumentalSystems/Ouroboros-1MContext-Gemma-270m", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use MonumentalSystems/Ouroboros-1MContext-Gemma-270m with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "MonumentalSystems/Ouroboros-1MContext-Gemma-270m" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "MonumentalSystems/Ouroboros-1MContext-Gemma-270m", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/MonumentalSystems/Ouroboros-1MContext-Gemma-270m
- SGLang
How to use MonumentalSystems/Ouroboros-1MContext-Gemma-270m 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 "MonumentalSystems/Ouroboros-1MContext-Gemma-270m" \ --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": "MonumentalSystems/Ouroboros-1MContext-Gemma-270m", "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 "MonumentalSystems/Ouroboros-1MContext-Gemma-270m" \ --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": "MonumentalSystems/Ouroboros-1MContext-Gemma-270m", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use MonumentalSystems/Ouroboros-1MContext-Gemma-270m with Docker Model Runner:
docker model run hf.co/MonumentalSystems/Ouroboros-1MContext-Gemma-270m
Add model card with architecture details and LoRA config
Browse files
README.md
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
language: en
|
| 3 |
+
license: apache-2.0
|
| 4 |
+
tags:
|
| 5 |
+
- gemma3
|
| 6 |
+
- causal-lm
|
| 7 |
+
- 1m-context
|
| 8 |
+
- symbiogenesis
|
| 9 |
+
- episodic-memory
|
| 10 |
+
base_model: google/gemma-3-270m
|
| 11 |
+
library_name: transformers
|
| 12 |
+
---
|
| 13 |
+
|
| 14 |
+
# Ouroboros-1MContext-Gemma-270m
|
| 15 |
+
|
| 16 |
+
1M-context extension of Google's [Gemma 3 270M](https://huggingface.co/google/gemma-3-270m) for episodic memory research.
|
| 17 |
+
|
| 18 |
+
## Architecture
|
| 19 |
+
|
| 20 |
+
| Parameter | Value |
|
| 21 |
+
|---|---|
|
| 22 |
+
| Model type | Gemma3ForCausalLM |
|
| 23 |
+
| Hidden size | 640 |
|
| 24 |
+
| Intermediate size | 2048 |
|
| 25 |
+
| Num layers | 18 |
|
| 26 |
+
| Num attention heads | 4 (GQA, 1 KV head) |
|
| 27 |
+
| Head dim | 256 |
|
| 28 |
+
| Vocab size | 262,144 |
|
| 29 |
+
| Max position embeddings | 1,048,576 (1M context) |
|
| 30 |
+
| Total parameters | 268,098,176 |
|
| 31 |
+
| VRAM (bfloat16) | 0.54 GB |
|
| 32 |
+
|
| 33 |
+
## LoRA Adapter Configuration (for episodic memory)
|
| 34 |
+
|
| 35 |
+
| Parameter | Value |
|
| 36 |
+
|---|---|
|
| 37 |
+
| Rank | 4 |
|
| 38 |
+
| Alpha | 8 |
|
| 39 |
+
| Target modules | gate_proj, up_proj, down_proj |
|
| 40 |
+
| Params per adapter | 580,608 |
|
| 41 |
+
| Per LoRA pair (one layer, one module) | 10,752 |
|
| 42 |
+
|
| 43 |
+
## Usage
|
| 44 |
+
|
| 45 |
+
```python
|
| 46 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 47 |
+
|
| 48 |
+
model = AutoModelForCausalLM.from_pretrained("MonumentalSystems/Ouroboros-1MContext-Gemma-270m", torch_dtype="bfloat16")
|
| 49 |
+
tokenizer = AutoTokenizer.from_pretrained("MonumentalSystems/Ouroboros-1MContext-Gemma-270m")
|
| 50 |
+
```
|
| 51 |
+
|
| 52 |
+
## Citation
|
| 53 |
+
|
| 54 |
+
Used in "Continuous Memory: Zero-Forgetting Episodic Memory via Per-Memory LoRA Adapters" (ICLR 2026 submission).
|
| 55 |
+
|
| 56 |
+
W&B runs: `41uzevnn`, `oa8xe89e`, `2v01e4e9` (project: symbiogenesis)
|
| 57 |
+
|
| 58 |
+
## License
|
| 59 |
+
|
| 60 |
+
Apache 2.0 (following Gemma 3 license)
|