Update README.md
Browse files
README.md
CHANGED
@@ -52,7 +52,9 @@ Map the evolution of the concept of 'nothing' from Parmenides through Buddhist
|
|
52 |
```
|
53 |
|
54 |
**Expected Output:**
|
55 |
-
|
|
|
|
|
56 |
|
57 |
## Usage Examples
|
58 |
|
@@ -70,58 +72,3 @@ inputs = tokenizer(prompt, return_tensors="pt")
|
|
70 |
outputs = model.generate(**inputs, max_length=1000)
|
71 |
puml_code = tokenizer.decode(outputs[0], skip_special_tokens=True)
|
72 |
```
|
73 |
-
|
74 |
-
#### Python with Chat Template
|
75 |
-
```python
|
76 |
-
from transformers import AutoTokenizer, AutoModelForCausalLM
|
77 |
-
|
78 |
-
tokenizer = AutoTokenizer.from_pretrained("chrisrutherford/gpt-oss-pumlGenV1")
|
79 |
-
model = AutoModelForCausalLM.from_pretrained("chrisrutherford/gpt-oss-pumlGenV1")
|
80 |
-
|
81 |
-
# Format with chat template
|
82 |
-
messages = [
|
83 |
-
{"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"}
|
84 |
-
]
|
85 |
-
|
86 |
-
# Apply chat template
|
87 |
-
prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
|
88 |
-
inputs = tokenizer(prompt, return_tensors="pt")
|
89 |
-
|
90 |
-
# Generate with stop tokens
|
91 |
-
outputs = model.generate(
|
92 |
-
**inputs,
|
93 |
-
max_length=1000,
|
94 |
-
do_sample=True,
|
95 |
-
temperature=0.7,
|
96 |
-
pad_token_id=tokenizer.eos_token_id,
|
97 |
-
eos_token_id=tokenizer.eos_token_id
|
98 |
-
)
|
99 |
-
|
100 |
-
puml_code = tokenizer.decode(outputs[0], skip_special_tokens=True)
|
101 |
-
# Extract only the generated portion (after the prompt)
|
102 |
-
generated_text = puml_code[len(prompt):]
|
103 |
-
```
|
104 |
-
|
105 |
-
## Citation
|
106 |
-
|
107 |
-
```bibtex
|
108 |
-
@misc{rutherford2024gptossplantumv1,
|
109 |
-
title={GPT-OSS PlantUML Generation Model V1},
|
110 |
-
author={Chris Rutherford},
|
111 |
-
year={2024},
|
112 |
-
publisher={Hugging Face},
|
113 |
-
url={https://huggingface.co/chrisrutherford/gpt-oss-pumlGenV1}
|
114 |
-
}
|
115 |
-
```
|
116 |
-
|
117 |
-
## Contact
|
118 |
-
|
119 |
-
For questions, issues, or collaboration opportunities, please contact [contact information].
|
120 |
-
|
121 |
-
## Changelog
|
122 |
-
|
123 |
-
### Version 1.0
|
124 |
-
- Initial release
|
125 |
-
- Fine-tuned on philosophical and scientific concept mapping dataset
|
126 |
-
- Optimised for cross-disciplinary diagram generation
|
127 |
-
|
|
|
52 |
```
|
53 |
|
54 |
**Expected Output:**
|
55 |
+
|
56 |
+

|
57 |
+
|
58 |
|
59 |
## Usage Examples
|
60 |
|
|
|
72 |
outputs = model.generate(**inputs, max_length=1000)
|
73 |
puml_code = tokenizer.decode(outputs[0], skip_special_tokens=True)
|
74 |
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|