File size: 4,193 Bytes
6f6f989 e2effba 53ebf50 5fc75ae e2effba 53ebf50 e2effba 53ebf50 e2effba 53ebf50 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 |
---
license: apache-2.0
base_model:
- openai/gpt-oss-20b
---
# GPT-OSS PlantUML Generation Model V1
## Model Description
GPT-OSS PlantUML Generation Model V1 is a fine-tuned language model specialised in generating PlantUML diagrams from natural language descriptions. The model excels at creating complex conceptual diagrams that map philosophical, mathematical, and scientific concepts across different domains and historical periods.
## Model Details
- **Base Model:** GPT-OSS architecture
- **Model Type:** Causal Language Model
- **Language(s):** English
- **License:** Apache 2.0
- **Fine-tuned from:** openai/gpt-oss-20b (abliterated by huihui.ai)
## Training Details
### Training Data
The model was fine-tuned on the PumlGenV1 dataset of natural language descriptions paired with corresponding PlantUML diagram code.
### Training Configuration
- **Optimiser:** AdamW 8-bit
- **Learning Rate Schedule:** LoRA (Low-Rank Adaptation)
- LoRA Rank: 1000
- LoRA Alpha: 2000
- **Training Epochs:** 3
- **Batch Size:** 1
- **Gradient Accumulation Steps:** 16
- **Effective Batch Size:** 16
### Training Infrastructure
- Fine-tuning approach: Parameter-efficient fine-tuning with LoRA
- Memory optimisation: 8-bit AdamW optimiser
## Intended Use
### Primary Use Cases
- **Academic Research:** Visualising complex philosophical and scientific concepts
- **Educational Content:** Creating diagrams for teaching abstract ideas
- **Documentation:** Generating visual representations of conceptual frameworks
- **Knowledge Mapping:** Illustrating relationships between ideas across disciplines
### Example Usage
**Input Prompt:**
```
Map the evolution of the concept of 'nothing' from Parmenides through Buddhist śūnyatā to quantum vacuum fluctuations, showing philosophical, mathematical, and physical interpretations
```
**Expected Output:**
The model generates PlantUML code that creates a comprehensive diagram.
## Usage Examples
### Basic Usage
#### Python
```python
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("chrisrutherford/gpt-oss-pumlGenV1")
model = AutoModelForCausalLM.from_pretrained("chrisrutherford/gpt-oss-pumlGenV1")
prompt = "Map the evolution of the concept of 'nothing' from Parmenides through Buddhist śūnyatā to quantum vacuum fluctuations, showing philosophical, mathematical, and physical interpretations"
inputs = tokenizer(prompt, return_tensors="pt")
outputs = model.generate(**inputs, max_length=1000)
puml_code = tokenizer.decode(outputs[0], skip_special_tokens=True)
```
#### Python with Chat Template
```python
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("chrisrutherford/gpt-oss-pumlGenV1")
model = AutoModelForCausalLM.from_pretrained("chrisrutherford/gpt-oss-pumlGenV1")
# Format with chat template
messages = [
{"role": "user", "content": "Map the evolution of the concept of 'nothing' from Parmenides through Buddhist śūnyatā to quantum vacuum fluctuations, showing philosophical, mathematical, and physical interpretations"}
]
# Apply chat template
prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
inputs = tokenizer(prompt, return_tensors="pt")
# Generate with stop tokens
outputs = model.generate(
**inputs,
max_length=1000,
do_sample=True,
temperature=0.7,
pad_token_id=tokenizer.eos_token_id,
eos_token_id=tokenizer.eos_token_id
)
puml_code = tokenizer.decode(outputs[0], skip_special_tokens=True)
# Extract only the generated portion (after the prompt)
generated_text = puml_code[len(prompt):]
```
## Citation
```bibtex
@misc{rutherford2024gptossplantumv1,
title={GPT-OSS PlantUML Generation Model V1},
author={Chris Rutherford},
year={2024},
publisher={Hugging Face},
url={https://huggingface.co/chrisrutherford/gpt-oss-pumlGenV1}
}
```
## Contact
For questions, issues, or collaboration opportunities, please contact [contact information].
## Changelog
### Version 1.0
- Initial release
- Fine-tuned on philosophical and scientific concept mapping dataset
- Optimised for cross-disciplinary diagram generation
|