Text Generation
Transformers
Safetensors
PEFT
English
llama
chatgpt-prompts
role-playing
instruction-tuning
conversational
lora
Eval Results (legacy)
text-generation-inference
Instructions to use sweatSmile/Llama-3.2-3B-ChatGPT-Prompts-Instruct with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use sweatSmile/Llama-3.2-3B-ChatGPT-Prompts-Instruct with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="sweatSmile/Llama-3.2-3B-ChatGPT-Prompts-Instruct") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("sweatSmile/Llama-3.2-3B-ChatGPT-Prompts-Instruct") model = AutoModelForCausalLM.from_pretrained("sweatSmile/Llama-3.2-3B-ChatGPT-Prompts-Instruct", 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]:])) - PEFT
How to use sweatSmile/Llama-3.2-3B-ChatGPT-Prompts-Instruct with PEFT:
Task type is invalid.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use sweatSmile/Llama-3.2-3B-ChatGPT-Prompts-Instruct with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "sweatSmile/Llama-3.2-3B-ChatGPT-Prompts-Instruct" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "sweatSmile/Llama-3.2-3B-ChatGPT-Prompts-Instruct", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/sweatSmile/Llama-3.2-3B-ChatGPT-Prompts-Instruct
- SGLang
How to use sweatSmile/Llama-3.2-3B-ChatGPT-Prompts-Instruct 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 "sweatSmile/Llama-3.2-3B-ChatGPT-Prompts-Instruct" \ --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": "sweatSmile/Llama-3.2-3B-ChatGPT-Prompts-Instruct", "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 "sweatSmile/Llama-3.2-3B-ChatGPT-Prompts-Instruct" \ --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": "sweatSmile/Llama-3.2-3B-ChatGPT-Prompts-Instruct", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use sweatSmile/Llama-3.2-3B-ChatGPT-Prompts-Instruct with Docker Model Runner:
docker model run hf.co/sweatSmile/Llama-3.2-3B-ChatGPT-Prompts-Instruct
Update README.md
Browse files
README.md
CHANGED
|
@@ -1,3 +1,116 @@
|
|
| 1 |
-
---
|
| 2 |
-
|
| 3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Llama-3.2-3B-ChatGPT-Prompts-Instruct
|
| 2 |
+
|
| 3 |
+
## Model Description
|
| 4 |
+
|
| 5 |
+
This is a fine-tuned version of Meta's Llama-3.2-3B-Instruct model, specifically trained on the awesome-chatgpt-prompts dataset to excel at role-playing and prompt-based interactions. The model has been optimized to understand and respond to various professional and creative roles with enhanced accuracy and context awareness.
|
| 6 |
+
|
| 7 |
+
## Model Details
|
| 8 |
+
|
| 9 |
+
- **Base Model:** meta-llama/Llama-3.2-3B-Instruct
|
| 10 |
+
- **Model Type:** Causal Language Model
|
| 11 |
+
- **Fine-tuning Method:** LoRA (Low-Rank Adaptation)
|
| 12 |
+
- **Training Dataset:** fka/awesome-chatgpt-prompts
|
| 13 |
+
- **Model Size:** 3B parameters
|
| 14 |
+
- **Quantization:** 4-bit (BitsAndBytesConfig)
|
| 15 |
+
|
| 16 |
+
## Training Details
|
| 17 |
+
|
| 18 |
+
### Training Configuration
|
| 19 |
+
- **LoRA Rank:** 4
|
| 20 |
+
- **LoRA Alpha:** 8
|
| 21 |
+
- **Learning Rate:** 3e-4
|
| 22 |
+
- **Batch Size:** 8
|
| 23 |
+
- **Epochs:** 10
|
| 24 |
+
- **Max Sequence Length:** 64
|
| 25 |
+
- **Gradient Accumulation Steps:** 3
|
| 26 |
+
- **Optimizer:** AdamW with cosine learning rate scheduler
|
| 27 |
+
- **Weight Decay:** 0.01
|
| 28 |
+
- **Warmup Ratio:** 0.05
|
| 29 |
+
|
| 30 |
+
### Training Results
|
| 31 |
+
- **Final Training Loss:** 0.28
|
| 32 |
+
- **Training Steps:** 190
|
| 33 |
+
- **Training Runtime:** 399.47 seconds
|
| 34 |
+
- **Convergence:** Stable convergence with proper gradient norms
|
| 35 |
+
|
| 36 |
+
## Usage
|
| 37 |
+
|
| 38 |
+
```python
|
| 39 |
+
from transformers import AutoTokenizer, AutoModelForCausalLM
|
| 40 |
+
|
| 41 |
+
model_name = "sweatSmile/Llama-3.2-3B-ChatGPT-Prompts-Instruct"
|
| 42 |
+
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
| 43 |
+
model = AutoModelForCausalLM.from_pretrained(model_name)
|
| 44 |
+
|
| 45 |
+
# Example usage
|
| 46 |
+
prompt = "Linux Terminal"
|
| 47 |
+
inputs = tokenizer(prompt, return_tensors="pt")
|
| 48 |
+
outputs = model.generate(**inputs, max_length=512, temperature=0.7)
|
| 49 |
+
response = tokenizer.decode(outputs[0], skip_special_tokens=True)
|
| 50 |
+
```
|
| 51 |
+
|
| 52 |
+
## Intended Use
|
| 53 |
+
|
| 54 |
+
This model is designed for:
|
| 55 |
+
- **Role-playing scenarios:** Acting as various professionals (developers, translators, terminals, etc.)
|
| 56 |
+
- **Educational purposes:** Learning different professional contexts and responses
|
| 57 |
+
- **Creative writing assistance:** Generating contextually appropriate responses for different roles
|
| 58 |
+
- **Prompt engineering research:** Understanding how models respond to role-based instructions
|
| 59 |
+
|
| 60 |
+
## Capabilities
|
| 61 |
+
|
| 62 |
+
The model excels at:
|
| 63 |
+
- Understanding and adopting various professional roles
|
| 64 |
+
- Generating contextually appropriate responses
|
| 65 |
+
- Maintaining consistency within assigned roles
|
| 66 |
+
- Following complex instructions with role-specific knowledge
|
| 67 |
+
- Adapting communication style based on the requested persona
|
| 68 |
+
|
| 69 |
+
## Example Interactions
|
| 70 |
+
|
| 71 |
+
**Input:** "English Translator and Improver"
|
| 72 |
+
**Output:** The model will adopt the role of a professional translator and language improver, offering translation services and language enhancement capabilities.
|
| 73 |
+
|
| 74 |
+
**Input:** "Linux Terminal"
|
| 75 |
+
**Output:** The model will simulate a Linux terminal environment, responding to commands as a real terminal would.
|
| 76 |
+
|
| 77 |
+
## Limitations
|
| 78 |
+
|
| 79 |
+
- Model responses are generated based on training data and may not always reflect real-world accuracy
|
| 80 |
+
- Performance may vary depending on the complexity and specificity of role-based requests
|
| 81 |
+
- The model should not be used for generating harmful, biased, or inappropriate content
|
| 82 |
+
- Outputs should be verified for factual accuracy, especially in professional contexts
|
| 83 |
+
|
| 84 |
+
## Ethical Considerations
|
| 85 |
+
|
| 86 |
+
- This model should be used responsibly and ethically
|
| 87 |
+
- Users should be aware that this is an AI model and not substitute for real professional expertise
|
| 88 |
+
- The model should not be used to impersonate real individuals or for deceptive purposes
|
| 89 |
+
- Always disclose when content is AI-generated in professional or public contexts
|
| 90 |
+
|
| 91 |
+
## Technical Specifications
|
| 92 |
+
|
| 93 |
+
- **Framework:** Transformers, PEFT
|
| 94 |
+
- **Precision:** FP16
|
| 95 |
+
- **Memory Optimization:** Gradient checkpointing enabled
|
| 96 |
+
- **Hardware Requirements:** GPU recommended for inference
|
| 97 |
+
|
| 98 |
+
## License
|
| 99 |
+
|
| 100 |
+
This model inherits the license from the base Llama-3.2-3B-Instruct model. Please refer to Meta's license terms for usage restrictions and requirements.
|
| 101 |
+
|
| 102 |
+
## Citation
|
| 103 |
+
|
| 104 |
+
```bibtex
|
| 105 |
+
@model{llama32-chatgpt-prompts-instruct,
|
| 106 |
+
title={Llama-3.2-3B-ChatGPT-Prompts-Instruct},
|
| 107 |
+
author={sweatSmile},
|
| 108 |
+
year={2025},
|
| 109 |
+
base_model={meta-llama/Llama-3.2-3B-Instruct},
|
| 110 |
+
dataset={fka/awesome-chatgpt-prompts}
|
| 111 |
+
}
|
| 112 |
+
```
|
| 113 |
+
|
| 114 |
+
## Contact
|
| 115 |
+
|
| 116 |
+
For questions, issues, or feedback regarding this model, please create an issue in the model repository or contact the model author.
|