File size: 2,061 Bytes
b60dd15
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
---
license: mit
base_model: microsoft/Phi-3.5-mini-instruct
tags:
- phi3
- prompt-engineering
- syntaxa
- fine-tuned
- instruction-tuning
model_creator: saleen
model_type: phi3
language:
- en
pipeline_tag: text-generation
---

# Syntaxa-Prompt-Gen (Phi-3.5-mini-Instruct Fine-Tuned)

Syntaxa is a specialized fine-tuned version of **Microsoft's Phi-3.5-mini-instruct**. It is designed to act as a "Prompt Generator," turning simple persona descriptions into detailed, high-quality system prompts for other LLMs.

## 🚀 Model Details
- **Developed by:** Saleh (saleen)
- **Model type:** Causal Language Model (Transformer-based)
- **Base Model:** [microsoft/Phi-3.5-mini-instruct](https://huggingface.co/microsoft/Phi-3.5-mini-instruct)
- **Finetuning Technique:** LoRA (Low-Rank Adaptation)
- **Training Focus:** Instruction following for Persona-based prompt generation.

## 🎯 Intended Use
Syntaxa is intended to help users bridge the gap between a simple idea and a professional prompt. 
- **Input Format:** `### Instruction: Act as a [Persona]. Write a prompt for yourself.\n\n### Response:`
- **Output:** A comprehensive, structured system prompt including variables and specific constraints.

## 🛠️ Training Procedure
The model was fine-tuned using the following configuration:
- **Epochs:** 3
- **Batch Size:** 2 (with Gradient Accumulation Steps: 4)
- **Learning Rate:** 2e-4
- **Scheduler:** Cosine
- **Precision:** FP16
- **Dataset:** Custom instruction-set focusing on the "Awesome ChatGPT Prompts" structure.

## 💻 How to Use

```python
from transformers import AutoModelForCausalLM, AutoTokenizer, pipeline

model_id = "saleen/Syntaxa_Final_Full"

tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(model_id, device_map="auto", trust_remote_code=False)

pipe = pipeline("text-generation", model=model, tokenizer=tokenizer)

prompt = "### Instruction: Act as a Senior Web Developer. Write a prompt for yourself.\n\n### Response:"
print(pipe(prompt, max_new_tokens=256)[0]['generated_text'])