Update README.md
Browse files
README.md
CHANGED
|
@@ -15,6 +15,105 @@ tags:
|
|
| 15 |
This model was converted to GGUF format from [`ruggsea/Llama3.1-8B-SEP-Chat`](https://huggingface.co/ruggsea/Llama3.1-8B-SEP-Chat) using llama.cpp via the ggml.ai's [GGUF-my-repo](https://huggingface.co/spaces/ggml-org/gguf-my-repo) space.
|
| 16 |
Refer to the [original model card](https://huggingface.co/ruggsea/Llama3.1-8B-SEP-Chat) for more details on the model.
|
| 17 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 18 |
## Use with llama.cpp
|
| 19 |
Install llama.cpp through brew (works on Mac and Linux)
|
| 20 |
|
|
|
|
| 15 |
This model was converted to GGUF format from [`ruggsea/Llama3.1-8B-SEP-Chat`](https://huggingface.co/ruggsea/Llama3.1-8B-SEP-Chat) using llama.cpp via the ggml.ai's [GGUF-my-repo](https://huggingface.co/spaces/ggml-org/gguf-my-repo) space.
|
| 16 |
Refer to the [original model card](https://huggingface.co/ruggsea/Llama3.1-8B-SEP-Chat) for more details on the model.
|
| 17 |
|
| 18 |
+
---
|
| 19 |
+
Model details:
|
| 20 |
+
-
|
| 21 |
+
This model is a LoRA finetune of meta-llama/Meta-Llama-3.1-8B trained on multi-turn philosophical conversations. It is designed to engage in philosophical discussions in a conversational yet rigorous manner, maintaining academic standards while being accessible.
|
| 22 |
+
Model description
|
| 23 |
+
|
| 24 |
+
The model was trained using the TRL (Transformer Reinforcement Learning) library's chat template, enabling it to handle multi-turn conversations in a natural way. It builds upon the capabilities of its predecessor Llama3-stanford-encyclopedia-philosophy-QA but extends it to handle more interactive, back-and-forth philosophical discussions.
|
| 25 |
+
Chat Format
|
| 26 |
+
|
| 27 |
+
The model uses the standard chat format with roles:
|
| 28 |
+
|
| 29 |
+
<|system|>
|
| 30 |
+
{{system_prompt}}
|
| 31 |
+
<|user|>
|
| 32 |
+
{{user_message}}
|
| 33 |
+
<|assistant|>
|
| 34 |
+
{{assistant_response}}
|
| 35 |
+
|
| 36 |
+
Training Details
|
| 37 |
+
|
| 38 |
+
The model was trained with the following system prompt:
|
| 39 |
+
|
| 40 |
+
You are an expert and informative yet accessible Philosophy university professor. Students will engage with you in philosophical discussions. Respond to their questions and comments in a correct and rigorous but accessible way, maintaining academic standards while fostering understanding.
|
| 41 |
+
|
| 42 |
+
Training hyperparameters
|
| 43 |
+
|
| 44 |
+
The following hyperparameters were used during training:
|
| 45 |
+
|
| 46 |
+
Learning rate: 2e-5
|
| 47 |
+
Train batch size: 1
|
| 48 |
+
Gradient accumulation steps: 4
|
| 49 |
+
Effective batch size: 4
|
| 50 |
+
Optimizer: paged_adamw_8bit
|
| 51 |
+
LR scheduler: cosine with warmup
|
| 52 |
+
Warmup ratio: 0.03
|
| 53 |
+
Training epochs: 5
|
| 54 |
+
LoRA config:
|
| 55 |
+
r: 256
|
| 56 |
+
alpha: 128
|
| 57 |
+
Target modules: all-linear
|
| 58 |
+
Dropout: 0.05
|
| 59 |
+
|
| 60 |
+
Framework versions
|
| 61 |
+
|
| 62 |
+
PEFT 0.10.0
|
| 63 |
+
Transformers 4.40.1
|
| 64 |
+
PyTorch 2.2.2+cu121
|
| 65 |
+
TRL latest
|
| 66 |
+
Datasets 2.19.0
|
| 67 |
+
Tokenizers 0.19.1
|
| 68 |
+
|
| 69 |
+
Intended Use
|
| 70 |
+
|
| 71 |
+
This model is designed for:
|
| 72 |
+
|
| 73 |
+
Multi-turn philosophical discussions
|
| 74 |
+
Academic philosophical inquiry
|
| 75 |
+
Teaching and learning philosophy
|
| 76 |
+
Exploring philosophical concepts through dialogue
|
| 77 |
+
|
| 78 |
+
Limitations
|
| 79 |
+
|
| 80 |
+
The model should not be used as a substitute for professional philosophical advice or formal philosophical education
|
| 81 |
+
While the model aims to be accurate, its responses should be verified against authoritative sources
|
| 82 |
+
The model may occasionally generate plausible-sounding but incorrect philosophical arguments
|
| 83 |
+
As with all language models, it may exhibit biases present in its training data
|
| 84 |
+
|
| 85 |
+
License
|
| 86 |
+
|
| 87 |
+
This model is subject to the Meta Llama 2 license agreement. Please refer to Meta's licensing terms for usage requirements and restrictions.
|
| 88 |
+
How to use
|
| 89 |
+
|
| 90 |
+
Here's an example of how to use the model:
|
| 91 |
+
|
| 92 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 93 |
+
|
| 94 |
+
# Load model and tokenizer
|
| 95 |
+
model = AutoModelForCausalLM.from_pretrained("ruggsea/Llama3.1-SEP-Chat")
|
| 96 |
+
tokenizer = AutoTokenizer.from_pretrained("ruggsea/Llama3.1-SEP-Chat")
|
| 97 |
+
|
| 98 |
+
|
| 99 |
+
# Example conversation
|
| 100 |
+
messages = [
|
| 101 |
+
{"role": "user", "content": "What is the difference between ethics and morality?"}
|
| 102 |
+
]
|
| 103 |
+
|
| 104 |
+
# Format prompt using chat template
|
| 105 |
+
prompt = tokenizer.apply_chat_template(
|
| 106 |
+
messages,
|
| 107 |
+
add_generation_prompt=True,
|
| 108 |
+
tokenize=False
|
| 109 |
+
)
|
| 110 |
+
|
| 111 |
+
# Generate response
|
| 112 |
+
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
|
| 113 |
+
outputs = model.generate(**inputs, max_new_tokens=512)
|
| 114 |
+
response = tokenizer.decode(outputs[0], skip_special_tokens=True)
|
| 115 |
+
|
| 116 |
+
---
|
| 117 |
## Use with llama.cpp
|
| 118 |
Install llama.cpp through brew (works on Mac and Linux)
|
| 119 |
|