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
| language: en | |
| license: apache-2.0 | |
| tags: | |
| - gemma3 | |
| - causal-lm | |
| - 1m-context | |
| - symbiogenesis | |
| - episodic-memory | |
| base_model: google/gemma-3-270m | |
| library_name: transformers | |
| # Ouroboros-1MContext-Gemma-270m | |
| 1M-context extension of Google's [Gemma 3 270M](https://huggingface.co/google/gemma-3-270m) for episodic memory research. | |
| ## Architecture | |
| | Parameter | Value | | |
| |---|---| | |
| | Model type | Gemma3ForCausalLM | | |
| | Hidden size | 640 | | |
| | Intermediate size | 2048 | | |
| | Num layers | 18 | | |
| | Num attention heads | 4 (GQA, 1 KV head) | | |
| | Head dim | 256 | | |
| | Vocab size | 262,144 | | |
| | Max position embeddings | 1,048,576 (1M context) | | |
| | Total parameters | 268,098,176 | | |
| | VRAM (bfloat16) | 0.54 GB | | |
| ## LoRA Adapter Configuration (for episodic memory) | |
| | Parameter | Value | | |
| |---|---| | |
| | Rank | 4 | | |
| | Alpha | 8 | | |
| | Target modules | gate_proj, up_proj, down_proj | | |
| | Params per adapter | 580,608 | | |
| | Per LoRA pair (one layer, one module) | 10,752 | | |
| ## Usage | |
| ```python | |
| from transformers import AutoModelForCausalLM, AutoTokenizer | |
| model = AutoModelForCausalLM.from_pretrained("MonumentalSystems/Ouroboros-1MContext-Gemma-270m", torch_dtype="bfloat16") | |
| tokenizer = AutoTokenizer.from_pretrained("MonumentalSystems/Ouroboros-1MContext-Gemma-270m") | |
| ``` | |
| ## Citation | |
| Used in "Continuous Memory: Zero-Forgetting Episodic Memory via Per-Memory LoRA Adapters" (ICLR 2026 submission). | |
| W&B runs: `41uzevnn`, `oa8xe89e`, `2v01e4e9` (project: symbiogenesis) | |
| ## License | |
| Apache 2.0 (following Gemma 3 license) | |