Text Generation
Transformers
Safetensors
qwen2
qwen
conversational
reasoning
math
code-generation
css
javascript
html
physics
text-generation-inference
Instructions to use GenueAI/Geode-Onyx-2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use GenueAI/Geode-Onyx-2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="GenueAI/Geode-Onyx-2", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("GenueAI/Geode-Onyx-2") model = AutoModelForCausalLM.from_pretrained("GenueAI/Geode-Onyx-2", 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 GenueAI/Geode-Onyx-2 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "GenueAI/Geode-Onyx-2" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "GenueAI/Geode-Onyx-2", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/GenueAI/Geode-Onyx-2
- SGLang
How to use GenueAI/Geode-Onyx-2 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 "GenueAI/Geode-Onyx-2" \ --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": "GenueAI/Geode-Onyx-2", "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 "GenueAI/Geode-Onyx-2" \ --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": "GenueAI/Geode-Onyx-2", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use GenueAI/Geode-Onyx-2 with Docker Model Runner:
docker model run hf.co/GenueAI/Geode-Onyx-2
Upload README.md with huggingface_hub
Browse files
README.md
ADDED
|
@@ -0,0 +1,98 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
base_model: Qwen/Qwen2.5-3B-Instruct
|
| 3 |
+
library_name: transformers
|
| 4 |
+
license: apache-2.0
|
| 5 |
+
tags:
|
| 6 |
+
- qwen
|
| 7 |
+
- conversational
|
| 8 |
+
- reasoning
|
| 9 |
+
- math
|
| 10 |
+
- code-generation
|
| 11 |
+
- css
|
| 12 |
+
- javascript
|
| 13 |
+
- html
|
| 14 |
+
- physics
|
| 15 |
+
---
|
| 16 |
+
|
| 17 |
+
# 💎 Geode Onyx 2 (3B)
|
| 18 |
+
|
| 19 |
+
Onyx 2 is a 3-billion parameter conversational AI model, fine-tuned as part of the second generation of the Geode model family.
|
| 20 |
+
|
| 21 |
+
## Model Details
|
| 22 |
+
|
| 23 |
+
- **Base Model:** Qwen 2.5 3B Instruct
|
| 24 |
+
- **Parameters:** 3 Billion
|
| 25 |
+
- **Fine-Tuning:** LoRA (r=32, alpha=64)
|
| 26 |
+
- **Training Loss:** 0.40
|
| 27 |
+
- **Precision:** FP16
|
| 28 |
+
- **License:** Apache 2.0
|
| 29 |
+
|
| 30 |
+
## The Geode Family (Second Generation)
|
| 31 |
+
|
| 32 |
+
The Geode family is Genue AI's lineup of locally-runnable conversational models. In the second generation, Beryl has been retired and replaced by Pyrite, a specialized coding model:
|
| 33 |
+
|
| 34 |
+
| Model | Parameters | Role |
|
| 35 |
+
|-------|------------|------|
|
| 36 |
+
| Pyrite | 7B | Coding specialist |
|
| 37 |
+
| Onyx | 3B | Balanced logic & personality |
|
| 38 |
+
| Thaumite | 8B | Flagship, highest capability |
|
| 39 |
+
|
| 40 |
+
**Note:** Beryl (0.5B) was the original lightweight experimental model in the first generation and has been replaced by Pyrite, which focuses specifically on code generation tasks.
|
| 41 |
+
|
| 42 |
+
## Usage
|
| 43 |
+
|
| 44 |
+
Onyx 2 uses the Qwen Instruct prompt format:
|
| 45 |
+
|
| 46 |
+
```python
|
| 47 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 48 |
+
import torch
|
| 49 |
+
|
| 50 |
+
model = AutoModelForCausalLM.from_pretrained(
|
| 51 |
+
"GenueAI/Geode-Onyx-2",
|
| 52 |
+
torch_dtype=torch.float16,
|
| 53 |
+
device_map="auto",
|
| 54 |
+
trust_remote_code=True
|
| 55 |
+
)
|
| 56 |
+
tokenizer = AutoTokenizer.from_pretrained("GenueAI/Geode-Onyx-2")
|
| 57 |
+
|
| 58 |
+
prompt = "<|im_start|>user\nWhat is your name?<|im_end|>\n<|im_start|>assistant\n"
|
| 59 |
+
inputs = tokenizer(prompt, return_tensors="pt").to("cuda")
|
| 60 |
+
outputs = model.generate(**inputs, max_new_tokens=256, temperature=0.7)
|
| 61 |
+
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
|
| 62 |
+
```
|
| 63 |
+
|
| 64 |
+
## Training Data
|
| 65 |
+
|
| 66 |
+
Fine-tuned on a curated dataset of 1,013 examples covering:
|
| 67 |
+
|
| 68 |
+
- **Identity & self-awareness** - AI assistant identity and capabilities
|
| 69 |
+
- **Mathematical reasoning** - Arithmetic, algebra, word problems
|
| 70 |
+
- **General knowledge** - Broad factual knowledge
|
| 71 |
+
- **HTML/CSS/JavaScript code generation** - Web development tasks
|
| 72 |
+
- **Physics problems** - Falling objects, thermodynamics
|
| 73 |
+
- **Genue AI ecosystem knowledge** - Company information, model family details
|
| 74 |
+
- **Conversational generalization** - Natural dialogue patterns
|
| 75 |
+
- **Anti-hallucination training** - Proper handling of unknown information (time, location, preferences)
|
| 76 |
+
|
| 77 |
+
## Model Architecture
|
| 78 |
+
|
| 79 |
+
- Base: Qwen 2.5 3B Instruct
|
| 80 |
+
- Adapter: LoRA with r=32, alpha=64
|
| 81 |
+
- Target modules: q_proj, k_proj, v_proj, o_proj, gate_proj, up_proj, down_proj
|
| 82 |
+
- Trainable parameters: 59.9M (1.9% of total)
|
| 83 |
+
|
| 84 |
+
## Training Details
|
| 85 |
+
|
| 86 |
+
- **Training regime:** FP16 mixed precision
|
| 87 |
+
- **Epochs:** 2
|
| 88 |
+
- **Batch size:** 8
|
| 89 |
+
- **Learning rate:** 2e-4
|
| 90 |
+
- **Training time:** ~8 minutes on RTX 3090
|
| 91 |
+
|
| 92 |
+
## Developed By
|
| 93 |
+
|
| 94 |
+
Genue AI — Founded by Brybod123 (Bradar)
|
| 95 |
+
|
| 96 |
+
## Model Card Contact
|
| 97 |
+
|
| 98 |
+
For questions or issues, contact Genue AI through the HuggingFace repository.
|