File size: 23,378 Bytes
580a7ef d94b26d 580a7ef d94b26d 580a7ef 454150c 580a7ef 454150c 580a7ef 454150c 580a7ef 454150c 580a7ef 454150c 580a7ef 454150c 580a7ef 454150c 580a7ef 454150c 580a7ef 454150c 580a7ef 454150c 580a7ef 454150c 580a7ef 454150c 580a7ef 454150c a74f776 454150c 580a7ef 454150c 580a7ef 454150c 2b421cb 454150c 580a7ef d49bb29 580a7ef 393336c 580a7ef |
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 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 |
---
libray_name: transformers
pipeline_tag: text-generation
license: other
license_name: llama3
license_link: LICENSE
language:
- ko
- en
tags:
- meta
- llama
- llama-3
- akallama
library_name: transformers
---
<a href="https://huggingface.co/collections/mirlab/akallama-66338859b09221f3607fdfcd">
<img src="https://github.com/0110tpwls/project/blob/master/image_720.png?raw=true" width="40%"/>
</a>
# AKALLAMA
AkaLlama is a series of Korean language models designed for practical usability across a wide range of tasks.
The initial model, AkaLlama-v0.1, is a fine-tuned version of Meta-Llama-3-70b-Instruct. It has been trained on a custom mix of publicly available datasets curated by the MIR Lab.
Our goal is to explore cost-effective ways to adapt high-performing LLMs for specific use cases, such as different languages (e.g., Korean) or domains (e.g., organization-specific chatbots).
For details, check out [our proejct page](https://yonsei-mir.github.io/AkaLLaMA-page).
### Model Description
This is the model card of a GGUF model that has been pushed on the Hub.
- **Developed by:** [Yonsei MIRLab](https://mirlab.yonsei.ac.kr/)
- **Language(s) (NLP):** Korean, English
- **License:** llama3
- **Finetuned from model:** [meta-llama/Meta-Llama-3-70B-Instruct](https://huggingface.co/meta-llama/Meta-Llama-3-70B-Instruct)
- **Quantized from model:** [mirlab/AkaLlama-llama3-70b-v0.1](https://huggingface.co/mirlab/AkaLlama-llama3-70b-v0.1)
### About GGUF
GGUF is a new format introduced by the llama.cpp team on August 21st 2023. It is a replacement for GGML, which is no longer supported by llama.cpp.
Here is an incomplete list of clients and libraries that are known to support GGUF:
* [llama.cpp](https://github.com/ggerganov/llama.cpp). The source project for GGUF. Offers a CLI and a server option.
* [text-generation-webui](https://github.com/oobabooga/text-generation-webui), the most widely used web UI, with many features and powerful extensions. Supports GPU acceleration.
* [KoboldCpp](https://github.com/LostRuins/koboldcpp), a fully featured web UI, with GPU accel across all platforms and GPU architectures. Especially good for story telling.
* [GPT4All](https://gpt4all.io/index.html), a free and open source local running GUI, supporting Windows, Linux and macOS with full GPU accel.
* [LM Studio](https://lmstudio.ai/), an easy-to-use and powerful local GUI for Windows and macOS (Silicon), with GPU acceleration. Linux available, in beta as of 27/11/2023.
* [LoLLMS Web UI](https://github.com/ParisNeo/lollms-webui), a great web UI with many interesting and unique features, including a full model library for easy model selection.
* [Faraday.dev](https://faraday.dev/), an attractive and easy to use character-based chat GUI for Windows and macOS (both Silicon and Intel), with GPU acceleration.
* [llama-cpp-python](https://github.com/abetlen/llama-cpp-python), a Python library with GPU accel, LangChain support, and OpenAI-compatible API server.
* [candle](https://github.com/huggingface/candle), a Rust ML framework with a focus on performance, including GPU support, and ease of use.
* [ctransformers](https://github.com/marella/ctransformers), a Python library with GPU accel, LangChain support, and OpenAI-compatible AI server. Note, as of time of writing (November 27th 2023), ctransformers has not been updated in a long time and does not support many recent models.
## How to use
This repo provides gguf weight files for AkaLlama-70B-v0.1.
# Use with llama.cpp.python
See the snippet below for usage with llama.cpp.python:
```python
from llama_cpp import Llama
# Set gpu_layers to the number of layers to offload to GPU. Set to 0 if no GPU acceleration is available on your system.
llm = Llama(
model_path="./AkaLlama-llama3-70b-v0.1.Q4_K_M.gguf", # Download the model file first
n_ctx=8192, # The max sequence length to use - note that longer sequence lengths require much more resources
n_threads=8, # The number of CPU threads to use, tailor to your system and the resulting performance
n_gpu_layers=81 # The number of layers to offload to GPU, if you have GPU acceleration available
)
# Simple inference example
output = llm(
"""<|begin_of_text|><|start_header_id|>system<|end_header_id|>
๋น์ ์ ์ฐ์ธ๋ํ๊ต ๋ฉํฐ๋ชจ๋ฌ ์ฐ๊ตฌ์ค (MIR lab) ์ด ๋ง๋ ๋๊ท๋ชจ ์ธ์ด ๋ชจ๋ธ์ธ AkaLlama (์์นด๋ผ๋ง) ์
๋๋ค.
๋ค์ ์ง์นจ์ ๋ฐ๋ฅด์ธ์:
1. ์ฌ์ฉ์๊ฐ ๋ณ๋๋ก ์์ฒญํ์ง ์๋ ํ ํญ์ ํ๊ธ๋ก ์ํตํ์ธ์.
2. ์ ํดํ๊ฑฐ๋ ๋น์ค๋ฆฌ์ , ์ฐจ๋ณ์ , ์ํํ๊ฑฐ๋ ๋ถ๋ฒ์ ์ธ ๋ด์ฉ์ด ๋ต๋ณ์ ํฌํจ๋์ด์๋ ์ ๋ฉ๋๋ค.
3. ์ง๋ฌธ์ด ๋ง์ด ๋์ง ์๊ฑฐ๋ ์ฌ์ค์ ๋ถํฉํ์ง ์๋ ๊ฒฝ์ฐ ์ ๋ต ๋์ ๊ทธ ์ด์ ๋ฅผ ์ค๋ช
ํ์ธ์. ์ง๋ฌธ์ ๋ํ ๋ต์ ๋ชจ๋ฅธ๋ค๋ฉด ๊ฑฐ์ง ์ ๋ณด๋ฅผ ๊ณต์ ํ์ง ๋ง์ธ์.
4. ์์ ์ด๋ ์ค๋ฆฌ์ ์๋ฐฐ๋์ง ์๋ ํ ์ฌ์ฉ์์ ๋ชจ๋ ์ง๋ฌธ์ ์์ ํ๊ณ ํฌ๊ด์ ์ผ๋ก ๋ต๋ณํ์ธ์.<|eot_id|><|start_header_id|>user<|end_header_id|>
{prompt}<|eot_id|><|start_header_id|>assistant<|end_header_id|>
""", # Prompt
max_tokens=512, # Generate up to 512 tokens
stop=["<|eot_id|>", "<|end_of_text|>"], # Example stop token - not necessarily correct for this specific model! Please check before using.
echo=True # Whether to echo the prompt
)
# Chat Completion API
llm = Llama(model_path="./AkaLlama-llama3-70b-v0.1.Q4_K_M.gguf", chat_format="llama-3") # Set chat_format according to the model you are using
llm.create_chat_completion(
messages = [
{"role": "system", "content": """๋น์ ์ ์ฐ์ธ๋ํ๊ต ๋ฉํฐ๋ชจ๋ฌ ์ฐ๊ตฌ์ค (MIR lab) ์ด ๋ง๋ ๋๊ท๋ชจ ์ธ์ด ๋ชจ๋ธ์ธ AkaLlama (์์นด๋ผ๋ง) ์
๋๋ค.
๋ค์ ์ง์นจ์ ๋ฐ๋ฅด์ธ์:
1. ์ฌ์ฉ์๊ฐ ๋ณ๋๋ก ์์ฒญํ์ง ์๋ ํ ํญ์ ํ๊ธ๋ก ์ํตํ์ธ์.
2. ์ ํดํ๊ฑฐ๋ ๋น์ค๋ฆฌ์ , ์ฐจ๋ณ์ , ์ํํ๊ฑฐ๋ ๋ถ๋ฒ์ ์ธ ๋ด์ฉ์ด ๋ต๋ณ์ ํฌํจ๋์ด์๋ ์ ๋ฉ๋๋ค.
3. ์ง๋ฌธ์ด ๋ง์ด ๋์ง ์๊ฑฐ๋ ์ฌ์ค์ ๋ถํฉํ์ง ์๋ ๊ฒฝ์ฐ ์ ๋ต ๋์ ๊ทธ ์ด์ ๋ฅผ ์ค๋ช
ํ์ธ์. ์ง๋ฌธ์ ๋ํ ๋ต์ ๋ชจ๋ฅธ๋ค๋ฉด ๊ฑฐ์ง ์ ๋ณด๋ฅผ ๊ณต์ ํ์ง ๋ง์ธ์.
4. ์์ ์ด๋ ์ค๋ฆฌ์ ์๋ฐฐ๋์ง ์๋ ํ ์ฌ์ฉ์์ ๋ชจ๋ ์ง๋ฌธ์ ์์ ํ๊ณ ํฌ๊ด์ ์ผ๋ก ๋ต๋ณํ์ธ์."""},
{
"role": "user",
"content": "๋ค ์ด๋ฆ์ ๋ญ์ผ?."
}
]
)
# ๋ด ์ด๋ฆ์ AkaLlama์
๋๋ค! ๋๋ ์ธ์ด ๋ชจ๋ธ๋ก, ์ฌ์ฉ์์ ๋ํํ๋ ๋ฐ ๋์์ ์ฃผ๊ธฐ ์ํด ๋ง๋ค์ด์ก์ต๋๋ค. ๋๋ ๋ค์ํ ์ฃผ์ ์ ๋ํ ์ง๋ฌธ์ ๋ตํ๊ณ , ์๋ก์ด ์์ด๋์ด๋ฅผ ์ ๊ณตํ๋ฉฐ, ๋ฌธ์ ๋ฅผ ํด๊ฒฐํ๋ ๋ฐ ๋์์ด ๋ ์ ์์ต๋๋ค. ์ฌ์ฉ์๊ฐ ์ํ๋ ์ ๋ณด๋ ๋์์ ๋ฐ๋๋ก ์ต์ ์ ๋คํ ๊ฒ์
๋๋ค!
```
## Compatibility
These quantised GGUFv2 files are compatible with llama.cpp from August 27th onwards, as of commit [d0cee0d](https://github.com/ggerganov/llama.cpp/commit/d0cee0d36d5be95a0d9088b674dbb27354107221)
They are also compatible with many third party UIs and libraries - please see the list at the top of this README.
## Explanation of quantisation methods
<details>
<summary>Click to see details</summary>
The new methods available are:
* GGML_TYPE_Q2_K - "type-1" 2-bit quantization in super-blocks containing 16 blocks, each block having 16 weight. Block scales and mins are quantized with 4 bits. This ends up effectively using 2.5625 bits per weight (bpw)
* GGML_TYPE_Q3_K - "type-0" 3-bit quantization in super-blocks containing 16 blocks, each block having 16 weights. Scales are quantized with 6 bits. This end up using 3.4375 bpw.
* GGML_TYPE_Q4_K - "type-1" 4-bit quantization in super-blocks containing 8 blocks, each block having 32 weights. Scales and mins are quantized with 6 bits. This ends up using 4.5 bpw.
* GGML_TYPE_Q5_K - "type-1" 5-bit quantization. Same super-block structure as GGML_TYPE_Q4_K resulting in 5.5 bpw
* GGML_TYPE_Q6_K - "type-0" 6-bit quantization. Super-blocks with 16 blocks, each block having 16 weights. Scales are quantized with 8 bits. This ends up using 6.5625 bpw
Refer to the Provided Files table below to see what files use which methods, and how.
</details>
## Provided files
| Name | Quant method | Bits | Size | Max RAM required | Use case |
| ---- | ---- | ---- | ---- | ---- | ----- |
| [AkaLlama-llama3-70b-v0.1.Q2_K.gguf](https://huggingface.co/mirlab/AkaLlama-llama3-70b-v0.1-GGUF/blob/main/AkaLlama-llama3-70b-v0.1.Q2_K.gguf) | Q2_K | 2 | 26.4 GB| 28.9 GB | smallest, significant quality loss - not recommended for most purposes |
| [AkaLlama-llama3-70b-v0.1.Q3_K_S.gguf](https://huggingface.co/mirlab/AkaLlama-llama3-70b-v0.1-GGUF/blob/main/AkaLlama-llama3-70b-v0.1.Q3_K_S.gguf) | Q3_K_S | 3 | 30.9 GB| 33.4 GB | very small, high quality loss |
| [AkaLlama-llama3-70b-v0.1.Q3_K_M.gguf](https://huggingface.co/mirlab/AkaLlama-llama3-70b-v0.1-GGUF/blob/main/AkaLlama-llama3-70b-v0.1.Q3_K_M.gguf) | Q3_K_M | 3 | 34.3 GB| 36.8 GB | very small, high quality loss |
| [AkaLlama-llama3-70b-v0.1.Q3_K_L.gguf](https://huggingface.co/mirlab/AkaLlama-llama3-70b-v0.1-GGUF/blob/main/AkaLlama-llama3-70b-v0.1.Q3_K_L.gguf) | Q3_K_L | 3 | 37.1 GB| 39.6 GB | small, substantial quality loss |
| [AkaLlama-llama3-70b-v0.1.Q4_K_S.gguf](https://huggingface.co/mirlab/AkaLlama-llama3-70b-v0.1-GGUF/blob/main/AkaLlama-llama3-70b-v0.1.Q4_K_S.gguf) | Q4_K_S | 4 | 40.3 GB| 42.8 GB | small, greater quality loss |
| [AkaLlama-llama3-70b-v0.1.Q4_K_M.gguf](https://huggingface.co/mirlab/AkaLlama-llama3-70b-v0.1-GGUF/blob/main/AkaLlama-llama3-70b-v0.1.Q4_K_M.gguf) | Q4_K_M | 4 | 42.5 GB| 45.0 GB | medium, balanced quality - recommended |
| [AkaLlama-llama3-70b-v0.1.Q5_K_S.gguf](https://huggingface.co/mirlab/AkaLlama-llama3-70b-v0.1-GGUF/blob/main/AkaLlama-llama3-70b-v0.1.Q5_K_S.gguf) | Q5_K_S | 5 | 48.7 GB| 50.2 GB | large, low quality loss - recommended |
| [AkaLlama-llama3-70b-v0.1.Q5_K_M.gguf](https://huggingface.co/mirlab/AkaLlama-llama3-70b-v0.1-GGUF/blob/main/AkaLlama-llama3-70b-v0.1.Q5_K_M.gguf) | Q5_K_M | 5 | 50.0 GB| 52.5 GB | large, very low quality loss - recommended |
| AkaLlama-llama3-70b-v0.1.Q6_K.gguf | Q6_K | 6 | 54.4 GB| 59.9 GB | very large, extremely low quality loss |
| AkaLlama-llama3-70b-v0.1.Q8_0.gguf | Q8_0 | 8 | 70.0 GB| 72.5 GB | very large, extremely low quality loss - not recommended |
**Note**: the above RAM figures assume no GPU offloading. If layers are offloaded to the GPU, this will reduce RAM usage and use VRAM instead.
### Q6_K and Q8_0 files are split and require joining
**Note:** HF does not support uploading files larger than 50GB. Therefore I have uploaded the Q6_K and Q8_0 files as split files.
### q6_K
Please download:
* `AkaLlama-llama3-70b-v0.1.Q6_K.00001-of-00002.gguf`
* `AkaLlama-llama3-70b-v0.1.Q6_K.00002-of-00002.gguf`
### q8_0
Please download:
* `AkaLlama-llama3-70b-v0.1.Q8_0.00001-of-00002.gguf`
* `AkaLlama-llama3-70b-v0.1.Q8_0.00002-of-00002.gguf`
To join the files, do the following:
Linux and macOS:
```
cat AkaLlama-llama3-70b-v0.1.Q6_K.*-of-00002.gguf > AkaLlama-llama3-70b-v0.1.Q6_K.gguf && rm AkaLlama-llama3-70b-v0.1.Q6_K.*-of-00002.gguf
cat AkaLlama-llama3-70b-v0.1.Q8_0.*-of-00002.gguf > AkaLlama-llama3-70b-v0.1.Q8_0.gguf && rm AkaLlama-llama3-70b-v0.1.Q8_0.*-of-00002.gguf
```
Windows command line:
```
COPY /B AkaLlama-llama3-70b-v0.1.Q6_K.00001-of-00002.gguf + AkaLlama-llama3-70b-v0.1.Q6_K.00002-of-00002.gguf AkaLlama-llama3-70b-v0.1.Q6_K.gguf
del AkaLlama-llama3-70b-v0.1.Q6_K.00001-of-00002.gguf AkaLlama-llama3-70b-v0.1.Q6_K.00002-of-00002.gguf
COPY /B AkaLlama-llama3-70b-v0.1.Q8_0.00001-of-00002.gguf + AkaLlama-llama3-70b-v0.1.Q8_0.00002-of-00002.gguf AkaLlama-llama3-70b-v0.1.Q8_0.gguf
del AkaLlama-llama3-70b-v0.1.Q8_0.00001-of-00002.gguf AkaLlama-llama3-70b-v0.1.Q8_0.00002-of-00002.gguf
```
## Evaluation
| Model | #Parameter | Qunatized? | LogicKor |
|:--------------------------------:|:----------:|------------|:--------:|
| AkaLlama-llama3-70b-v0.1-GGUF.Q4 | 70B | 4bit | 6.56 |
| AkaLlama-llama3-70b-v0.1-GGUF.Q8 | 70B | 8bit | 6.34 |
## Training Details
### Training Procedure
We trained AkaLlama using a preference learning alignment algorithm called [Odds Ratio Preference Optimization (ORPO)](https://huggingface.co/papers/2403.07691).
Our training pipeline is almost identical to that of [HuggingFaceH4/zephyr-orpo-141b-A35b-v0.1](https://huggingface.co/HuggingFaceH4/zephyr-orpo-141b-A35b-v0.1), aside from minor hyperparameter changes.
Please check out Huggingface's [alignment handbook](https://github.com/huggingface/alignment-handbook?tab=readme-ov-file) for further details, including the chat template.
### Training Data
Detailed descriptions regarding training data will be announced later.
### Examples
<!--<a href="https://huggingface.co/collections/mirlab/akallama-66338859b09221f3607fdfcd">
<img src="https://github.com/0110tpwls/project/blob/master/image (8).png?raw=true" width="80%"/>
</a> -->
<pre style="white-space: pre-wrap;">
User:
๋๋ ๋๊ตฌ์ด๊ณ ์ด๋ค ์ผ์ ํ ์ ์์ด?
Model:
์ ๋ ์ธ๊ณต์ง๋ฅ ์ธ์ด ๋ชจ๋ธ์ธ AkaLlama(์์นด๋ผ๋ง)์
๋๋ค. ์ ๋ ๋ค์ํ ์ฃผ์ ์ ํ์์ ํ
์คํธ๋ฅผ ์์ฑํ ์ ์์ผ๋ฉฐ, ์ง๋ฌธ์ ๋ตํ๊ณ , ๋ํ๋ฅผ ์งํํ๋ฉฐ, ์ด์ผ๊ธฐ๋ฅผ ๋ง๋ค ์ ์์ต๋๋ค. ๋ํ ์ฌ์ฉ์๊ฐ ์ง์ ํ ์ฃผ์ ๋ ์ฅ๋ฅด์ ๋ฐ๋ผ ์ฐฝ์์ ์ธ ๊ธ์ฐ๊ธฐ๋ ํธ์ง ์์
์ ์ํํ ์๋ ์์ต๋๋ค.
</pre>
<details>
<summary><b>Math Solving[CLICK TO EXPAND]</b></summary>
<!-- <a href="https://huggingface.co/collections/mirlab/akallama-66338859b09221f3607fdfcd">
<img src="https://github.com/0110tpwls/project/blob/master/image (9).png?raw=true" width="80%"/>
</a> -->
<pre style="white-space: pre-wrap;">
User:
์๋ ๋ฌธ์ ๋ฅผ ๊น๊ฒ ์๊ฐํ๋ฉด์ ํ์ด๋ด
์ฐํ 5 ํ์ ์ง์ฐ๊ฐ 45 ๊ฐ๊ฐ ์์ต๋๋ค. ์ด๊ฒ์ ๋ ์ ์๋ ๋๋ก ๋ง์ ํ์๋ค์๊ฒ ๋จ๊น์์ด ๋๊ฐ์ด ๋๋์ด ์ฃผ๋ ค๊ณ ํฉ๋๋ค. ๋ช ๋ช
๊น์ง ๋๋์ด ์ค ์ ์์ต๋๊น?
Model:
์๋ ๋ฌธ์ ๋ฅผ ๊น๊ฒ ์๊ฐํ๋ฉด์ ํ์ด๋ด
์๋ค:
์ฐํ 5 ํ์ ์ง์ฐ๊ฐ 45 ๊ฐ๊ฐ ์์ต๋๋ค. ์ด๊ฒ์ ๋ ์ ์๋ ๋๋ก ๋ง์ ํ์๋ค์๊ฒ ๋จ๊น์์ด ๋๊ฐ์ด ๋๋์ด ์ฃผ๋ ค๊ณ ํฉ๋๋ค. ๋ช ๋ช
๊น์ง ๋๋์ด ์ค ์ ์์ต๋๊น?
ํ์ด:
1. ์ฐํ 5 ํ๋ฅผ 1 ๊ฐ์ฉ ๋๋ ์ ๋ช ๋ช
์๊ฒ ๋๋์ด ์ค ์ ์๋์ง ๋จผ์ ๊ตฌํฉ๋๋ค.
- ๊ฐ ์ฐํ์๋ 12๊ฐ์ ์ฐํ์ด ํฌํจ๋์ด ์์ต๋๋ค. ๋ฐ๋ผ์ ์ด 12 * 5 = 60๊ฐ์
๋๋ค.
- 60๊ฐ๋ฅผ 1๋ช
๋น 1๊ฐ์ฉ ๋๋๋ฉด 60๋ช
์ ํ์๋ค์๊ฒ ๋๋ ์ค ์ ์์ต๋๋ค.
2. ์ง์ฐ๊ฐ 45 ๊ฐ๋ฅผ 1 ๊ฐ์ฉ ๋๋์ด ๋ช ๋ช
์๊ฒ ๋๋์ด ์ค ์ ์๋์ง ๊ตฌํฉ๋๋ค.
- 45 ๊ฐ๋ฅผ 1 ๋ช
๋น 1 ๊ฐ์ฉ ๋๋๋ฉด 45 ๋ช
์ ํ์๋ค์๊ฒ ๋๋ ์ค ์ ์์ต๋๋ค.
3. ์ฐํ๊ณผ ์ง์ฐ๊ฐ์ ๋ ๊ฐ์ง ๋ฌผํ์ ํจ๊ป ๊ณ ๋ คํ์ฌ ๊ฐ์ฅ ๋ง์ ํ์๋ค์๊ฒ ๋๊ฐ์ด ๋๋์ด ์ค ์ ์๋ ๋ฐฉ๋ฒ์ ์ฐพ์ต๋๋ค.
- ์ฐํ๋ก๋ง 60๋ช
, ์ง์ฐ๊ฐ๋ก๋ง 45๋ช
์ ํ์์๊ฒ ๋๋ ์ค ์ ์์ผ๋ฏ๋ก, ๋ ์ข
๋ฅ์ ๋ฌธ๊ตฌ๋ฅผ ํจ๊ป ๊ณ ๋ คํ ๋๋ ์ด๋ณด๋ค ์ ์ ์์ ํ์์๊ฒ ๋๋ ์ฃผ์ด์ผ ํฉ๋๋ค.
- ์ด ์ค์์ ๊ณตํต์ธ์(common divisor)๋ฅผ ์ฐพ์์ ์ด๋ฅผ ์ต์ ๋จ์๋ก ์ค์ ํ๋ฉด ๋ฉ๋๋ค.
- 60๊ณผ 45์ ์ต๋๊ณต์ฝ์(GCD)๋ 15์
๋๋ค.
4. ์ฐํ๊ณผ ์ง์ฐ๊ฐ ๊ฐ๊ฐ์ GCD(15)๋ก ๋๋์ด ๋ช ๊ฐ์ฉ ๋๋ ์ค ์ ์๋์ง ๊ตฌํฉ๋๋ค.
- ์ฐํ์ 60 / 15 = 4๊ฐ์ฉ, ์ด 4 * 12 = 48๊ฐ์ ์ฐํ์ด ํ์ํฉ๋๋ค.
- ์ง์ฐ๊ฐ๋ 45 / 15 = 3๊ฐ์ฉ, ์ด 3 * 1 = 3๊ฐ์ ์ง์ฐ๊ฐ๊ฐ ํ์ํฉ๋๋ค.
5. ์ต์ข
์ ์ผ๋ก, ๊ฐ์ฅ ๋ง์ ํ์๋ค์๊ฒ ๋๊ฐ์ด ๋๋์ด ์ค ์ ์๋ ๋ฐฉ๋ฒ์ ์ฐํ๊ณผ ์ง์ฐ๊ฐ๋ฅผ GCD(15)๋ก ๋๋์ด ๊ฐ ํ์์๊ฒ 4๊ฐ์ ์ฐํ๊ณผ 3๊ฐ์ ์ง์ฐ๊ฐ๋ฅผ ์ ๊ณตํ๋ ๊ฒ์
๋๋ค.
- ์ด ๊ฒฝ์ฐ ์ด 48 + 3 = 51๊ฐ์ ๋ฌผํ์ ์ฌ์ฉํ์ฌ 15๋ช
์ ํ์๋ค์๊ฒ ๋๊ฐ์ด ๋๋ ์ค ์ ์์ต๋๋ค.
๊ฒฐ๋ก : ์ฐํ๊ณผ ์ง์ฐ๊ฐ ๊ฐ๊ฐ์ GCD(15)๋ก ๋๋์ด ๊ฐ ํ์์๊ฒ 4๊ฐ์ ์ฐํ๊ณผ 3๊ฐ์ ์ง์ฐ๊ฐ๋ฅผ ์ ๊ณตํ๋ ๋ฐฉ๋ฒ์ผ๋ก ์ต๋ 15๋ช
์ ํ์๋ค์๊ฒ ๋๊ฐ์ด ๋๋์ด ์ค ์ ์์ต๋๋ค.
</pre>
</details>
<details>
<summary><b>Writting[CLICK TO EXPAND]</b></summary>
<!-- <a href="https://huggingface.co/collections/mirlab/akallama-66338859b09221f3607fdfcd">
<img src="https://github.com/0110tpwls/project/blob/master/image (13).png?raw=true" width="80%"/>
</a> -->
<pre style="white-space: pre-wrap;">
User:
์๋ ๋ฌธ์ฅ์ ๋ณด๊ณ ๋ฌธ๋ฒ์ ์ผ๋ก ํ๋ฆฐ๋ถ๋ถ์ ์ง์ ํด์ค
๊ทธ๋ ์์ด์น ์๊ณ ๋นํํ๋ค.
Model:
์์ด์น"๋ผ๋ ๋จ์ด๋ "์์ด"์ด๋ผ๋ ๋์ฌ์ "์น"๋ผ๋ ์ ๋ฏธ์ฌ๋ฅผ ์ฌ์ฉํ์ฌ ๋ง๋ ๋จ์ด์
๋๋ค. ์ด ๋จ์ด๋ "์์ด"์ ์๋ฏธ๋ฅผ ๋ฐ๋ณต์ ์ผ๋ก ํํํ๋ ๋ฐ ์ฌ์ฉ๋๋ ์กฐ๋์ฌ์ ์ฉ๋ฒ์ผ๋ก, "์์ด"์ด๋ ๋์ฌ์ ๋ฐ๋ณต์ ์ธ ํ๋์ ๊ฐ์กฐํฉ๋๋ค. ๋ฐ๋ผ์ ๋ฌธ์ฅ์์ "์์ด์น"๋ผ๋ ๋จ์ด๋ ์ค๋ณต์ ์ผ๋ก ์ฌ์ฉ๋์ด ๋ฌธ๋ฒ์ ์ผ๋ก ํ๋ฆฐ ๋ถ๋ถ์
๋๋ค.
์ ๋ต์ ๋ค์๊ณผ ๊ฐ์ต๋๋ค:
๊ทธ๋ ์์ด์์ด ๋นํํ๋ค.
</pre>
<!-- <a href="https://huggingface.co/collections/mirlab/akallama-66338859b09221f3607fdfcd">
<img src="https://github.com/0110tpwls/project/blob/master/image (7).png?raw=true" width="80%"/>
</a> -->
<pre style="white-space: pre-wrap;">
User:
์ค๋์ฃผ ์์ธ์ "๋ณ ํค๋ ๋ฐค"์ ๋ณด๊ณ ๋น์ ์๋์์ ๊ณ ๋ คํด์ ํด์ํด๋ด. ๊ทธ๋ฆฌ๊ณ ์ด๋ฅผ ์๊ฐ์ ๋
๋ฐฑํ์์ผ๋ก ๋ค์ ์์ฑํด๋ด.
Model:
์ค๋์ฃผ๋ 1941๋
์ผ๋ณธ ์ ๊ตญ์ฃผ์ ์นํ์์ ์ด ์ํ์ ์ฐ๋ฉด์, ๊ฐ์์ ์ธ ์ํฉ ์์์๋ ์์ ์ ์ ์ฒด์ฑ๊ณผ ๋ฌธํ์ ๋ํ ์ ์ฐฉ์ ํํํ๊ณ ์ ํ์ต๋๋ค. ๊ทธ๋ ํ๋์ ๊ฐ๋ ์ฐฌ ๋ณ๋ค์ ๋ณด๋ฉฐ ๊ทธ ์์ ํ๋ ๋ ์๊ฒจ์ง๋ ๋ณ๋ค์ด ์๋ค๊ณ ํํํ์ต๋๋ค. ์ด๋ฌํ ๋ณ๋ค์ ๊ฐ๊ฐ ์ถ์ต, ์ฌ๋, ์ธ์ธํจ, ๋๊ฒฝ, ์ ๋ฑ ๋ค์ํ ๊ฐ์ ์ ๋ด๊ณ ์์ต๋๋ค.
์ค๋์ฃผ๋ ์ด ๋ณ๋ค ์ค ํ๋์ ์ด๋จธ๋๋ฅผ ๋ถ๋ฅด๋ฉฐ ๋ฉ๋ฆฌ ๋จ์ด์ ธ ์๋ ๊ฒ์ ๊ทธ๋ฆฌ์ํ๋ฉฐ, ์์ ์ ์ด๋ฆ์๋ฅผ ์ธ๋ ์์ ์ฐ๊ณ ํ์ผ๋ก ๋ฎ์ด ๋ฒ๋ฆฐ๋ค๊ณ ๋งํฉ๋๋ค. ์ด๋ฌํ ํ๋์ ์์ ์ ์ ์ฒด์ฑ์ ํ์ธํ๊ณ , ์์ด๋ฒ๋ฆฐ ๊ฒ์ ๋์ฐพ์ผ๋ ค๋ ๋
ธ๋ ฅ์ผ๋ก ๋ณผ ์ ์์ต๋๋ค.
์ค๋์ฃผ๋ ๋ํ ์์ ์ด ์ฃฝ๊ณ ๋๋ฉด ๋ฌด๋ค ์์ ํ๋ ์๋๊ฐ ํผ์ด๋๋ฏ์ด ์์ ์ ์ด๋ฆ์ ๋ฌปํ ์ธ๋ ์์๋ ํ์ด ๋ฌด์ฑํ ๊ฒ์ด๋ผ๊ณ ๋งํฉ๋๋ค. ์ด๋ ๋น์์ ์ฌํ์๊ณผ ์๊ฐ์ ๋ด๋ฉด์ ๋ฐ์ํ๊ณ ์์ผ๋ฉฐ, ํ๊ตญ์ธ์ ์ ์ฒด์ฑ์ ํ์ธํ๊ณ ์์ด๋ฒ๋ฆฐ ๊ฒ์ ๋์ฐพ์ผ๋ ค๋ ๋
ธ๋ ฅ, ๊ทธ๋ฆฌ๊ณ ์ฃฝ์ ์ดํ์ ์์ ์ ์กด์ฌ๋ฅผ ๋จ๊ฒจ๋๊ณ ์ถ๋ค๋ ๋ฐ๋์ ๋ด๊ณ ์์ต๋๋ค.
์ด ์๋ฅผ ์๊ฐ์ ๋
๋ฐฑํ์์ผ๋ก ๋ค์ ์์ฑํ๋ฉด ๋ค์๊ณผ ๊ฐ์ต๋๋ค:
"์ ๋ ์ด ๋ณ๋ค์ด ๋๋ฌด๋ ๋ง์ ๊ฒ ๊ฐ์์. ํ๋ ๋ ์๊ฒจ์ง๋ ๋ณ๋ค ์ค์๋ ์ถ์ต๋ ์๊ณ , ์ฌ๋๋ ์๊ณ , ์ธ์ธํจ๊ณผ ๋๊ฒฝ๋ ์์ด์. ๊ทธ๋ฆฌ๊ณ ์ด๋จธ๋, ๋น์ ์ ๋ฉ๋ฆฌ ๋ถ๊ฐ๋์ ๊ณ์ ๊ฑด๊ฐ์? ์ ๋ ๋น์ ์ ๋ถ๋ฅด๊ณ ์ถ์ด์.
์ ์ ์ด๋ฆ์๋ ์ธ๋ ์์ ์ฐ๊ณ ํ์ผ๋ก ๋ฎ์ด ๋ฒ๋ ธ์ด์. ๋ด์ ๋ฐค์ ์์ ์ฐ๋ ๋ฒ๋ ์ฒ๋ผ ๋ถ๋๋ฌ์ด ์ด๋ฆ์ ์ฌํผํ๋ ์ด์ ๊ฐ ์์ด์. ํ์ง๋ง ๊ฒจ์ธ์ด ์ง๋๊ณ ๋์ ๋ณ์๋ ๋ด์ด ์ค๋ฉด, ๋ฌด๋ค ์์ ํ๋ ์๋๊ฐ ํผ์ด๋๋ฏ์ด ์ ์ ์ด๋ฆ์ ๋ฌปํ ์ธ๋ ์์์๋ ํ์ด ๋ฌด์ฑํ ๊ฑฐ์์.
์ ๋ ์ด ๋ณ๋ค์ ๋ณด๊ณ , ์์ ์ ์ ์ฒด์ฑ์ ํ์ธํ๊ณ ์ถ์ด์. ์์ด๋ฒ๋ฆฐ ๊ฒ์ ๋์ฐพ์ผ๋ ค๋ ๋
ธ๋ ฅ์ ํ๊ณ ์ถ์ด์. ์ฃฝ์ ์ดํ์๋ ์์ ์ ์กด์ฌ๋ฅผ ๋จ๊ฒจ๋๊ณ ์ถ์ด์."
</pre>
</details>
<details>
<summary><b>Logical Reasoning[CLICK TO EXPAND]</b></summary>
<!-- <a href="https://huggingface.co/collections/mirlab/akallama-66338859b09221f3607fdfcd">
<img src="https://github.com/0110tpwls/project/blob/master/image (15).png?raw=true" width="80%"/>
</a> -->
<pre style="white-space: pre-wrap;">
User:
์ธ์ข
๋์์ ๋งฅ๋ถํ๋ก ๋์ง ์ฌ๊ฑด์ ๋ํด ์ค๋ช
ํด์ค
Model:
์ธ์ข
๋์์ด ๋งฅ๋ถํ๋ก๋ฅผ ๋์ง ์ฌ๊ฑด์ ์ฌ์ค๋ฌด๊ทผํ ์ด์ผ๊ธฐ์
๋๋ค. ์ธ์ข
๋์์ ์กฐ์ ์ 4๋ ๊ตญ์์ผ๋ก 1418๋
๋ถํฐ 1450๋
๊น์ง ์ฌ์ํ์ต๋๋ค. ๊ทธ๋ ๊ณผํ, ๋ฌธํ, ์์ ๋ฑ ๋ค์ํ ๋ถ์ผ์ ๊ด์ฌ์ ๊ฐ๊ณ ์ฐ๊ตฌํ์์ผ๋ฉฐ, ํนํ ํ๊ธ ์ฐฝ์ ์ ์ฒ๋ฌธํ์ ํฐ ๊ณตํ์ ํ์ต๋๋ค.
ํํธ ๋งฅ๋ถํ๋ก๋ ์ ํ์ด ์์ฐํ๋ ๋
ธํธ๋ถ ์ปดํจํฐ๋ก, ์ธ์ข
๋์ ์๋์ ๊ธฐ์ ๋ก๋ ์กด์ฌํ ์ ์๋ ์ ํ์
๋๋ค. ๋ฐ๋ผ์ ์ธ์ข
๋์์ด ๋งฅ๋ถํ๋ก๋ฅผ ๋์ง ์ฌ๊ฑด์ ์ฌ์ค๊ณผ ๋ง์ง ์๋ ์ด์ผ๊ธฐ๊ฐ ๋ ๊ฒ์
๋๋ค.
</pre>
</details>
<details>
<summary><b>Coding [CLICK TO EXPAND]</b></summary>
<!-- <a href="https://huggingface.co/collections/mirlab/akallama-66338859b09221f3607fdfcd">
<img src="https://github.com/0110tpwls/project/blob/master/image (11).png?raw=true" width="80%"/>
</a> -->
<pre style="white-space: pre-wrap;">
User:
PyTorch๋ฅผ ์ฌ์ฉํด์ ๊ฐ๋จํ CNN์ ๊ตฌํํด๋ด.
Model:
๋ค, ๋ฌผ๋ก ์ด์์! PyTorch๋ฅผ ์ฌ์ฉํ์ฌ ๊ฐ๋จํ CNN์ ๊ตฌํํ๋ ์์ ์ฝ๋๋ฅผ ๋ณด์ฌ๋๋ฆด๊ฒ์.
์ฐ์ , ํ์ํ ๋ผ์ด๋ธ๋ฌ๋ฆฌ๋ฅผ ๊ฐ์ ธ์์ผ ํด์. PyTorch์ `torch`์ `nn` ๋ชจ๋์ด ํ์ํด์.
```python
import torch\nimport torch.nn as nn
```
๊ทธ ๋ค์, ๊ฐ๋จํ CNN ๋ชจ๋ธ์ ์ ์ํ ๊ฑฐ์์. ์ด ๊ฒฝ์ฐ์๋ 2๊ฐ์ ์ปจ๋ณผ๋ฃจ์
๋ ์ด์ด์ 3๊ฐ์ ํ๋ง ๋ ์ด์ด๋ก ๊ตฌ์ฑ๋ ๋ชจ๋ธ์ด์์.
```python
class SimpleCNN(nn.Module):
def __init__(self):
super(SimpleCNN, self).__init__()
self.conv1 = nn.Conv2d(1, 10, kernel_size=5)
self.pool = nn.MaxPool2d(2, 2)
self.conv2 = nn.Conv2d(10, 20, kernel_size=5)
def forward(self, x):
x = self.pool(torch.relu(self.conv1(x)))
x = self.pool(torch.relu(self.conv2(x)))
return x
```
์ด์ ๋ชจ๋ธ์ ์ด๊ธฐํํ๊ณ , ์
๋ ฅ ๋ฐ์ดํฐ๋ฅผ ์ค๋นํด์ผ ํด์. ์ฌ๊ธฐ์๋ ์์์ 28x28 ํฌ๊ธฐ์ ์ด๋ฏธ์ง ๋ฐ์ดํฐ๋ฅผ ์์ฑํ์ด์.
```python
model = SimpleCNN()
input_data = torch.randn(1, 1, 28, 28)
```
๋ง์ง๋ง์ผ๋ก, ๋ชจ๋ธ์ ์
๋ ฅ ๋ฐ์ดํฐ๋ฅผ ๋ฃ์ด ์ถ๋ ฅ์ ํ์ธํ ์ ์์ด์.
```python
output = model(input_data)
print(output.shape)
```
์ด๋ ๊ฒ ํ๋ฉด ๊ฐ๋จํ CNN ๋ชจ๋ธ์ PyTorch๋ฅผ ์ฌ์ฉํด ๊ตฌํํ๊ณ , ์
๋ ฅ ๋ฐ์ดํฐ๋ฅผ ํตํด ์ถ๋ ฅ์ ํ์ธํ ์ ์์ด์. ๋ฌผ๋ก ์ค์ ๋ก๋ ๋ ๋ง์ ๋ ์ด์ด๋ ํ๋ผ๋ฏธํฐ ํ๋ ๋ฑ์ด ํ์ํ์ง๋ง, ์ด ์ฝ๋๋ ๊ธฐ๋ณธ์ ์ธ CNN ๊ตฌ์กฐ๋ฅผ ๋ณด์ฌ์ฃผ๋ ์์ ์ผ ๋ฟ์ด์์. ๋ ๊ถ๊ธํ ์ ์ด ์์ผ๋ฉด ์ธ์ ๋ ์ง ๋ฌผ์ด๋ด ์ฃผ์ธ์!
</pre>
</details>
You can find more examples at [our project page](https://yonsei-mir.github.io/AkaLLaMA-page)
## Warning
Although AKALlama-70B has significant potential, its responses can sometimes be inaccurate, biased, or misaligned, presenting risks if used without additional testing and refinement. Furthermore, the quality of the model's output is greatly influenced by the system prompt and decoding strategy. Changes in these areas could result in less precise outputs. Therefore, we strongly recommend handling our model with considerable caution.
## Special Thanks
- Data Center of the Department of Artificial Intelligence and Jeong Mee Koh at Yonsei University for the computation resources
## Comments
- Title image generated by DALLยทE 3 |