Text Generation
Transformers
Safetensors
GGUF
Korean
gemma4
image-text-to-text
gemma
korean
roleplay
mud
lore
llama.cpp
lmstudio
conversational
Instructions to use sangwon1472/gemma4-e2b-mud with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use sangwon1472/gemma4-e2b-mud with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="sangwon1472/gemma4-e2b-mud") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# Load model directly from transformers import AutoProcessor, AutoModelForImageTextToText processor = AutoProcessor.from_pretrained("sangwon1472/gemma4-e2b-mud") model = AutoModelForImageTextToText.from_pretrained("sangwon1472/gemma4-e2b-mud") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] inputs = processor.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(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - llama-cpp-python
How to use sangwon1472/gemma4-e2b-mud with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="sangwon1472/gemma4-e2b-mud", filename="gemma4-e2b-mud-Q4_K_M.gguf", )
llm.create_chat_completion( messages = [ { "role": "user", "content": "What is the capital of France?" } ] ) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- llama.cpp
How to use sangwon1472/gemma4-e2b-mud with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf sangwon1472/gemma4-e2b-mud:UD-Q4_K_M # Run inference directly in the terminal: llama-cli -hf sangwon1472/gemma4-e2b-mud:UD-Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf sangwon1472/gemma4-e2b-mud:UD-Q4_K_M # Run inference directly in the terminal: llama-cli -hf sangwon1472/gemma4-e2b-mud:UD-Q4_K_M
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf sangwon1472/gemma4-e2b-mud:UD-Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf sangwon1472/gemma4-e2b-mud:UD-Q4_K_M
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf sangwon1472/gemma4-e2b-mud:UD-Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf sangwon1472/gemma4-e2b-mud:UD-Q4_K_M
Use Docker
docker model run hf.co/sangwon1472/gemma4-e2b-mud:UD-Q4_K_M
- LM Studio
- Jan
- vLLM
How to use sangwon1472/gemma4-e2b-mud with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "sangwon1472/gemma4-e2b-mud" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "sangwon1472/gemma4-e2b-mud", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/sangwon1472/gemma4-e2b-mud:UD-Q4_K_M
- SGLang
How to use sangwon1472/gemma4-e2b-mud 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 "sangwon1472/gemma4-e2b-mud" \ --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": "sangwon1472/gemma4-e2b-mud", "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 "sangwon1472/gemma4-e2b-mud" \ --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": "sangwon1472/gemma4-e2b-mud", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use sangwon1472/gemma4-e2b-mud with Ollama:
ollama run hf.co/sangwon1472/gemma4-e2b-mud:UD-Q4_K_M
- Unsloth Studio new
How to use sangwon1472/gemma4-e2b-mud with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for sangwon1472/gemma4-e2b-mud to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for sangwon1472/gemma4-e2b-mud to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for sangwon1472/gemma4-e2b-mud to start chatting
- Docker Model Runner
How to use sangwon1472/gemma4-e2b-mud with Docker Model Runner:
docker model run hf.co/sangwon1472/gemma4-e2b-mud:UD-Q4_K_M
- Lemonade
How to use sangwon1472/gemma4-e2b-mud with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull sangwon1472/gemma4-e2b-mud:UD-Q4_K_M
Run and chat with the model
lemonade run user.gemma4-e2b-mud-UD-Q4_K_M
List all available models
lemonade list
Commit Β·
49871e2
1
Parent(s): e5a8be6
Expand model card
Browse files
README.md
CHANGED
|
@@ -1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
|
|
|
|
|
|
|
|
|
|
|
| 7 |
|
| 8 |
-
|
| 9 |
-
-
|
| 10 |
-
- λͺ
λ Ή κΈ°λ° μΈν°λμ
|
| 11 |
-
- μμ¬ μ€μ¬ μΆλ ₯
|
| 12 |
|
| 13 |
-
##
|
| 14 |
-
Transformers λλ GGUF (LM Studio) μ¬μ© κ°λ₯
|
| 15 |
|
| 16 |
-
|
| 17 |
-
- `gemma-mud-colab-starter/`
|
| 18 |
-
Colab νμ΅ λ
ΈνΈλΆ, λ°μ΄ν°μ
μμ, LM Studio ν둬ννΈ, μ€ν κ°μ΄λλ₯Ό ν¨κ» λ£μ΄λ μ€νν° ν¨ν€μ§
|
|
|
|
| 1 |
---
|
| 2 |
license: apache-2.0
|
| 3 |
+
language:
|
| 4 |
+
- ko
|
| 5 |
+
library_name: transformers
|
| 6 |
+
pipeline_tag: text-generation
|
| 7 |
+
base_model:
|
| 8 |
+
- google/gemma-4-E2B-it
|
| 9 |
+
tags:
|
| 10 |
+
- gemma
|
| 11 |
+
- gemma4
|
| 12 |
+
- korean
|
| 13 |
+
- roleplay
|
| 14 |
+
- mud
|
| 15 |
+
- lore
|
| 16 |
+
- gguf
|
| 17 |
+
- llama.cpp
|
| 18 |
+
- lmstudio
|
| 19 |
+
- transformers
|
| 20 |
---
|
| 21 |
+
|
| 22 |
# gemma4-e2b-mud
|
| 23 |
|
| 24 |
+
`gemma4-e2b-mud` λ **Gemma 4 E2B κ³μ΄μ κΈ°λ°μΌλ‘ ν νκ΅μ΄ μ°μ£Όνν ν
μ€νΈ MUD μ€νμΌ λͺ¨λΈ**μ΄λ€.
|
| 25 |
+
μ§§μ λͺ
λ Ή λ°μ, NPC λμ¬, λ°© λΆμκΈ° λ¬μ¬, μ μΉ μ€λͺ
, νλ‘ ννΈ κ°μ **κ²μ μμ¬ λ μ΄μ΄**λ₯Ό λ€λ£¨κΈ° μ’κ² μ 리ν 체ν¬ν¬μΈνΈμ, μ΄λ₯Ό μ¬ννκ±°λ νμ₯ν μ μλ **Colab μ€νν° ν¨ν€μ§**, κ·Έλ¦¬κ³ **LM Studioμ© GGUF**λ₯Ό ν¨κ» μ 곡νλ€.
|
| 26 |
+
|
| 27 |
+
μ΄ μ μ₯μμ ν΅μ¬ λ°©ν₯μ βκ²μ μμ§μ νμ βμ΄ μλλΌ, **λ§ν¬, λΆμκΈ°, μ§§μ μΈκ³κ΄ μλ΅**μ AIκ° λ§‘λλ‘ λ§λλ κ²μ΄λ€.
|
| 28 |
+
|
| 29 |
+
## TL;DR
|
| 30 |
+
|
| 31 |
+
- κΈ°λ° λͺ¨λΈ: `google/gemma-4-E2B-it`
|
| 32 |
+
- μ£Ό μ¬μ© μΈμ΄: νκ΅μ΄
|
| 33 |
+
- μ£Ό μ¬μ© μμ: ν
μ€νΈ MUD, NPC λν, λ£Έ λ¬μ¬, μ μΉ/λ‘μ΄ μ€λͺ
|
| 34 |
+
- ν¬ν¨ νμ:
|
| 35 |
+
- Transformers 체ν¬ν¬μΈνΈ
|
| 36 |
+
- LM Studio / llama.cpp μ© `GGUF`
|
| 37 |
+
- Colab / Unsloth μ¬νμ© μ€νν° ν¨ν€μ§
|
| 38 |
+
- κ°μ₯ μ λ§λ μ
λ ₯:
|
| 39 |
+
- `talk oracle`
|
| 40 |
+
- `look`
|
| 41 |
+
- `rumor`
|
| 42 |
+
- `scan signal`
|
| 43 |
+
- `First Fire Horizonμ΄ μ΄λ€ κ³³μΈμ§ μ€λͺ
ν΄μ€.`
|
| 44 |
+
|
| 45 |
+
## μ΄ μ μ₯μμ λ€μ΄ μλ κ²
|
| 46 |
+
|
| 47 |
+
### 1. Transformers 체ν¬ν¬μΈνΈ
|
| 48 |
+
|
| 49 |
+
루νΈμλ λ³ν©λ Hugging Face νμ λͺ¨λΈ κ°μ€μΉκ° λ€μ΄ μλ€.
|
| 50 |
+
|
| 51 |
+
- `model-00001-of-00005.safetensors`
|
| 52 |
+
- `model-00002-of-00005.safetensors`
|
| 53 |
+
- `model-00003-of-00005.safetensors`
|
| 54 |
+
- `model-00004-of-00005.safetensors`
|
| 55 |
+
- `model-00005-of-00005.safetensors`
|
| 56 |
+
- `config.json`
|
| 57 |
+
- `processor_config.json`
|
| 58 |
+
- `tokenizer.json`
|
| 59 |
+
- `tokenizer_config.json`
|
| 60 |
+
- `chat_template.jinja`
|
| 61 |
+
|
| 62 |
+
### 2. GGUF
|
| 63 |
+
|
| 64 |
+
LM Studio / llama.cpp μ λ°λ‘ κ°μ Έκ° μ μλλ‘ λ€μ GGUF νμΌμ ν¨κ» μ 곡νλ€.
|
| 65 |
+
|
| 66 |
+
- `gemma4-e2b-mud-Q4_K_M.gguf`
|
| 67 |
+
|
| 68 |
+
μ΄ νμΌμ λ‘컬 μΆλ‘ , LM Studio ν
μ€νΈ, λΉ λ₯Έ λ°°ν¬μ μ ν©ν μμμ μ΄λ€.
|
| 69 |
+
|
| 70 |
+
### 3. Companion starter package
|
| 71 |
+
|
| 72 |
+
μ μ₯μ μμ [`gemma-mud-colab-starter/`](./gemma-mud-colab-starter) ν΄λμλ λ€μμ΄ ν¬ν¨λμ΄ μλ€.
|
| 73 |
+
|
| 74 |
+
- Colab λ
ΈνΈλΆ
|
| 75 |
+
- E2B / E4B μ€νμ© λ
ΈνΈλΆ λ³ν
|
| 76 |
+
- μμ λ°μ΄ν°μ
|
| 77 |
+
- LM Studio μμ€ν
ν둬ννΈ
|
| 78 |
+
- ν
μ€νΈ ν둬ννΈ
|
| 79 |
+
- μ€ν μλ΄μ νΈλ¬λΈμν
λ¬Έμ
|
| 80 |
+
|
| 81 |
+
μ¦ μ΄ μ μ₯μλ βλͺ¨λΈλ§ λμ Έ λμ ννβκ° μλλΌ, **μ€νκ³Ό λ°°ν¬κΉμ§ μ΄μ΄μ§λ ν¨ν€μ§ν μ μ₯μ**λ₯Ό λͺ©νλ‘ νλ€.
|
| 82 |
+
|
| 83 |
+
## λͺ¨λΈ κ°μ
|
| 84 |
+
|
| 85 |
+
μ΄ λͺ¨λΈμ **Gemma 4 E2B instruct κ³μ΄μ ν
μ€νΈ MUD ν€μ λ§κ² λ€λ¬μ νμ λͺ¨λΈ**μ΄λ€.
|
| 86 |
+
|
| 87 |
+
μ§ν₯νλ μλ΅μ μλμ κ°λ€.
|
| 88 |
+
|
| 89 |
+
- μ§§κ³ μ λͺ
ν NPC λμ¬
|
| 90 |
+
- λΆμκΈ°κ° μ΄μ μλ λ°©/μ₯λ©΄ μ€λͺ
|
| 91 |
+
- μΈκ³κ΄ κ³ μ λͺ
μ¬λ₯Ό μ€μ¬μΌλ‘ ν μ μΉ/λ‘μ΄ μλ΄
|
| 92 |
+
- νλ μ΄λ₯Ό λλ μ§§μ ννΈ
|
| 93 |
+
- λ²μ© λΉμν λ΅λ³λ³΄λ€, **μΈκ³ μμ 머무λ₯΄λ λ°μ**
|
| 94 |
+
|
| 95 |
+
λ°λλ‘ μλμ κ°μ λ°©ν₯μ νΌνλλ‘ μ€κ³νλ€.
|
| 96 |
+
|
| 97 |
+
- νμ€ κΈ°μ
/DB/μμ μ€λͺ
μΌλ‘ μλ λ΅λ³
|
| 98 |
+
- `AIλ‘μ...` κ°μ λ©ν λ°μΈ
|
| 99 |
+
- μ₯ν©ν λ°±κ³Όμ¬μ μ μ€λͺ
|
| 100 |
+
- κ²μ μνλ₯Ό λͺ¨λΈμ΄ μμλ‘ νμ νλ λ°ν
|
| 101 |
+
|
| 102 |
+
## κΈ°λ° λͺ¨λΈκ³Ό ꡬ쑰
|
| 103 |
+
|
| 104 |
+
μ΄ μ μ₯μμ κΈ°λ°μ [`google/gemma-4-E2B-it`](https://huggingface.co/google/gemma-4-E2B-it) μ΄λ€.
|
| 105 |
+
Gemma 4 E2Bλ Googleμ μμ Gemma 4 κ³μ΄ λͺ¨λΈμ΄λ©°, 곡μ μΉ΄λ κΈ°μ€μΌλ‘ **Apache 2.0** λΌμ΄μ μ€λ₯Ό μ¬μ©νλ€.
|
| 106 |
+
|
| 107 |
+
μ£Όμ:
|
| 108 |
+
|
| 109 |
+
- **μ΄ μ μ₯μ 루νΈμ μ¬λΌμ¨ μ€μ κ°μ€μΉμ GGUFλ E2B κΈ°λ°μ΄λ€.**
|
| 110 |
+
- starter package μμ λ€μ΄ μλ `E4B` λ
ΈνΈλΆμ **E4B μ€ν/μ¬νμ΅μ© companion notebook** μ΄λ©°, λ£¨νΈ μ²΄ν¬ν¬μΈνΈκ° E4BλΌλ λ»μ μλλ€.
|
| 111 |
+
|
| 112 |
+
μ΄ μ μ₯μμ λ‘컬 `config.json` κΈ°μ€ μ£Όμ ν
μ€νΈ μ€μ μ λ€μκ³Ό κ°λ€.
|
| 113 |
+
|
| 114 |
+
- μν€ν
μ²: `Gemma4ForConditionalGeneration`
|
| 115 |
+
- `model_type`: `gemma4`
|
| 116 |
+
- ν
μ€νΈ hidden size: `1536`
|
| 117 |
+
- ν
μ€νΈ λ μ΄μ΄ μ: `35`
|
| 118 |
+
- attention heads: `8`
|
| 119 |
+
- key/value heads: `1`
|
| 120 |
+
- intermediate size: `6144`
|
| 121 |
+
- vocab size: `262144`
|
| 122 |
+
- sliding window: `512`
|
| 123 |
+
|
| 124 |
+
μ€μ:
|
| 125 |
+
|
| 126 |
+
- **μ΄ νμ λͺ¨λΈμ μ€μ μ¬μ© μ΄μ μ ν
μ€νΈ μμ±**μ΄λ€.
|
| 127 |
+
- Gemma 4 E2B κ³μ΄ μ체λ μμ λ©ν°λͺ¨λ¬ κ³μ΄μ΄μ§λ§, μ΄ μ μ₯μμ μ€νν° ν¨ν€μ§μ μμ ν둬ννΈλ **ν
μ€νΈ MUD μ¬μ© μλ리μ€**μ λ§μΆ°μ Έ μλ€.
|
| 128 |
+
- ν¨κ» λ€μ΄ μλ GGUF νμΌ μμ LM Studioμμ **ν
μ€νΈ λν μ€μ¬**μΌλ‘ λ°λ‘ ν
μ€νΈνλ μ©λμ λ§λ€.
|
| 129 |
+
|
| 130 |
+
## μ΄λ€ μμ
μ μ λ§λκ°
|
| 131 |
+
|
| 132 |
+
### μ λ§λ μμ
|
| 133 |
+
|
| 134 |
+
- ν
μ€νΈ MUD NPC λν
|
| 135 |
+
- λ£Έ/μ₯λ©΄ λΆμκΈ° λ¬μ¬
|
| 136 |
+
- μ§§μ rumor / lore / signal μλ΅
|
| 137 |
+
- λ‘컬 μ€ν 리ν
λ§ ν
μ€νΈ
|
| 138 |
+
- νκ΅μ΄ μΈκ³κ΄ νλ‘ν νμ΄ν
|
| 139 |
+
- MUD μμ§μ βμμ¬ λ μ΄μ΄β λΆλ¦¬ μ€ν
|
| 140 |
+
|
| 141 |
+
### νΉν μ λ§λ μ
λ ₯ μ€νμΌ
|
| 142 |
+
|
| 143 |
+
- νλ λ¨μ΄ λͺ
λ Ήν
|
| 144 |
+
- `talk oracle`
|
| 145 |
+
- `look`
|
| 146 |
+
- `rumor`
|
| 147 |
+
- `scan signal`
|
| 148 |
+
- μ§§μ μ€λͺ
μμ²ν
|
| 149 |
+
- `First Fire Horizonμ΄ μ΄λ€ κ³³μΈμ§ μ€λͺ
ν΄μ€.`
|
| 150 |
+
- `Helios Vergeμ μλ―Έμ μ€μμ±μ μ€λͺ
ν΄μ€.`
|
| 151 |
+
|
| 152 |
+
## μ΄λ€ μμ
μλ λ§μ§ μλκ°
|
| 153 |
+
|
| 154 |
+
μ΄ λͺ¨λΈμ μλ μν μ **μ§μ λ΄λΉνμ§ μλ νΈμ΄ μμ νλ€.**
|
| 155 |
+
|
| 156 |
+
- νμ€νΈ μλ£ νμ
|
| 157 |
+
- 보μ μ§κΈ
|
| 158 |
+
- μμ΄ν
/골λ μ μ°
|
| 159 |
+
- λ¬Έ μ΄λ¦Ό/μ κΈ λ± μν λ³κ²½ νμ
|
| 160 |
+
- μ ν¬ μΉν¨ κ³μ°
|
| 161 |
+
- λ²λ₯ , μλ£, κΈμ΅ κ°μ κ³ μ λ’° μ 보 μ 곡
|
| 162 |
+
|
| 163 |
+
μ¦, μΆμ² μ¬μ© ꡬ쑰λ λ€μκ³Ό κ°λ€.
|
| 164 |
+
|
| 165 |
+
- **μμ§**: μ΄λ, μ ν¬, μν, 보μ, νμ€νΈ λ‘μ§
|
| 166 |
+
- **λͺ¨λΈ**: λμ¬, λΆμκΈ°, μ μΉ, μ§§μ ννΈ, λ¬μ¬
|
| 167 |
+
|
| 168 |
+
## λΉ λ₯Έ μμ
|
| 169 |
+
|
| 170 |
+
### Transformers λ‘ λ°λ‘ μ°κΈ°
|
| 171 |
+
|
| 172 |
+
Gemma 4 곡μ λ¬Έμμ μ¬μ© λ°©μμ λ§μΆ° `AutoProcessor` + `AutoModelForImageTextToText` κ²½λ‘λ‘ μμν μ μλ€.
|
| 173 |
+
|
| 174 |
+
```python
|
| 175 |
+
from transformers import AutoProcessor, AutoModelForImageTextToText
|
| 176 |
+
import torch
|
| 177 |
+
|
| 178 |
+
MODEL_ID = "sangwon1472/gemma4-e2b-mud"
|
| 179 |
+
|
| 180 |
+
processor = AutoProcessor.from_pretrained(MODEL_ID)
|
| 181 |
+
model = AutoModelForImageTextToText.from_pretrained(
|
| 182 |
+
MODEL_ID,
|
| 183 |
+
dtype="auto",
|
| 184 |
+
device_map="auto",
|
| 185 |
+
)
|
| 186 |
+
|
| 187 |
+
messages = [
|
| 188 |
+
{
|
| 189 |
+
"role": "system",
|
| 190 |
+
"content": "λΉμ μ μ°μ£Όνν ν
μ€νΈ MUDμ νλ‘ μλ΄μμ΄μ μΈκ³κ΄ ν΄μ€μλ€. λ΅λ³μ νκ΅μ΄λ‘ νλ€."
|
| 191 |
+
},
|
| 192 |
+
{
|
| 193 |
+
"role": "user",
|
| 194 |
+
"content": "talk oracle"
|
| 195 |
+
},
|
| 196 |
+
]
|
| 197 |
+
|
| 198 |
+
text = processor.apply_chat_template(
|
| 199 |
+
messages,
|
| 200 |
+
tokenize=False,
|
| 201 |
+
add_generation_prompt=True,
|
| 202 |
+
enable_thinking=False,
|
| 203 |
+
)
|
| 204 |
+
|
| 205 |
+
inputs = processor(text=text, return_tensors="pt").to(model.device)
|
| 206 |
+
input_len = inputs["input_ids"].shape[-1]
|
| 207 |
+
|
| 208 |
+
with torch.no_grad():
|
| 209 |
+
outputs = model.generate(
|
| 210 |
+
**inputs,
|
| 211 |
+
max_new_tokens=128,
|
| 212 |
+
temperature=1.0,
|
| 213 |
+
top_p=0.95,
|
| 214 |
+
top_k=64,
|
| 215 |
+
)
|
| 216 |
+
|
| 217 |
+
response = processor.decode(outputs[0][input_len:], skip_special_tokens=False)
|
| 218 |
+
print(processor.parse_response(response))
|
| 219 |
+
```
|
| 220 |
+
|
| 221 |
+
## LM Studio / llama.cpp μ¬μ©
|
| 222 |
+
|
| 223 |
+
μ΄ μ μ₯μμλ λ°λ‘ import κ°λ₯ν GGUF νμΌμ΄ ν¬ν¨λμ΄ μλ€.
|
| 224 |
+
|
| 225 |
+
- `gemma4-e2b-mud-Q4_K_M.gguf`
|
| 226 |
+
|
| 227 |
+
LM Studio μμλ μ΄ GGUFλ₯Ό κ°μ Έμμ λ°λ‘ ν
μ€νΈν μ μλ€.
|
| 228 |
+
ν¨κ» μ 곡νλ μμ€ν
ν둬ννΈμ ν
μ€νΈ λ¬Έμ₯μ starter package μμ μλ€.
|
| 229 |
+
|
| 230 |
+
- [`lmstudio_system_prompt_ko.txt`](./gemma-mud-colab-starter/examples/lmstudio_system_prompt_ko.txt)
|
| 231 |
+
- [`lmstudio_system_prompt_npc_ko.txt`](./gemma-mud-colab-starter/examples/lmstudio_system_prompt_npc_ko.txt)
|
| 232 |
+
- [`lmstudio_system_prompt_lore_ko.txt`](./gemma-mud-colab-starter/examples/lmstudio_system_prompt_lore_ko.txt)
|
| 233 |
+
- [`lmstudio_test_prompts.md`](./gemma-mud-colab-starter/examples/lmstudio_test_prompts.md)
|
| 234 |
+
|
| 235 |
+
### κΆμ₯ μμ ν둬ννΈ
|
| 236 |
+
|
| 237 |
+
- `talk oracle`
|
| 238 |
+
- `look`
|
| 239 |
+
- `rumor`
|
| 240 |
+
- `scan signal`
|
| 241 |
+
- `First Fire Horizonμ΄ μ΄λ€ κ³³μΈμ§ μ€λͺ
ν΄μ€.`
|
| 242 |
+
|
| 243 |
+
### κΆμ₯ μμ± μ€μ
|
| 244 |
+
|
| 245 |
+
Gemma 4 κ³μ΄μ 곡μ/μ€μ μ¬μ©μμ μλ κ°μ΄ 무λν μΆλ°μ μ΄λ€.
|
| 246 |
+
|
| 247 |
+
- `temperature = 1.0`
|
| 248 |
+
- `top_p = 0.95`
|
| 249 |
+
- `top_k = 64`
|
| 250 |
+
|
| 251 |
+
λ³΄λ€ μ§§κ³ μμ μ μΈ NPC λ΅λ³μ΄ νμνλ©΄ μλμ²λΌ μ‘°κΈ λ³΄μμ μΌλ‘ μμν΄λ μ’λ€.
|
| 252 |
+
|
| 253 |
+
- `temperature = 0.7`
|
| 254 |
+
- `max tokens = 96 ~ 128`
|
| 255 |
+
|
| 256 |
+
μμ βλ μ§§κ²β μ€μ μ μ΄ μ μ₯μμ MUD μ©λμ λ§μΆ μ€μ κΆμ₯κ°μ΄λ€.
|
| 257 |
+
|
| 258 |
+
## Companion starter package μλ΄
|
| 259 |
+
|
| 260 |
+
ν¨κ» μ 곡νλ [`gemma-mud-colab-starter/`](./gemma-mud-colab-starter) ν΄λλ λͺ¨λΈμ λ€μ νμ΅νκ±°λ λ³νν΄ λ³΄κ³ μΆμ μ¬μ©μλ₯Ό μν ꡬμ±μ΄λ€.
|
| 261 |
+
|
| 262 |
+
μ£Όμ νμΌ:
|
| 263 |
+
|
| 264 |
+
- [`README.md`](./gemma-mud-colab-starter/README.md)
|
| 265 |
+
- [`run_instructions.md`](./gemma-mud-colab-starter/run_instructions.md)
|
| 266 |
+
- [`troubleshooting.md`](./gemma-mud-colab-starter/troubleshooting.md)
|
| 267 |
+
- [`Gemma4_MUD_QLoRA_Colab_Notebook-E2B.ipynb`](./gemma-mud-colab-starter/notebooks/Gemma4_MUD_QLoRA_Colab_Notebook-E2B.ipynb)
|
| 268 |
+
- [`Gemma4_MUD_QLoRA_Colab_Notebook-E4B.ipynb`](./gemma-mud-colab-starter/notebooks/Gemma4_MUD_QLoRA_Colab_Notebook-E4B.ipynb)
|
| 269 |
+
|
| 270 |
+
ν¬ν¨λ μμ λ°μ΄ν°μ
:
|
| 271 |
+
|
| 272 |
+
- `combined_1000.jsonl` : 1000ν μλ³Έ
|
| 273 |
+
- `combined_1000.unsloth_chatml_dedup.jsonl` : 963ν μ 리본
|
| 274 |
+
- `combined_1000.unsloth_gemma4_messages_dedup.jsonl` : 963ν Gemma 4 messages μ 리본
|
| 275 |
+
- `gemma4_mud_alpaca_100.jsonl` : 100ν μν μμ
|
| 276 |
+
|
| 277 |
+
μ€μ:
|
| 278 |
+
|
| 279 |
+
- μ λ°μ΄ν°μ
μ **starter/retraining/example μ©λ**λ‘ ν¨κ» λ£μ΄ λ κ²μ΄λ€.
|
| 280 |
+
- μ΄ μ μ₯μμ 체ν¬ν¬μΈνΈλ₯Ό μ΄ν΄νκ±°λ νμ₯νλ λ° λμμ μ£Όλ μλ£μ΄λ©°, μ¬ν μ€νμ μν μΆλ°μ μΌλ‘ 보λ νΈμ΄ μ’λ€.
|
| 281 |
+
|
| 282 |
+
## μλ΅ νμ§μ λ³Ό λ μ’μ κΈ°μ€
|
| 283 |
+
|
| 284 |
+
μ λ΅ λ¬Έμ₯μ μΈμ λ΄λμ§κ° ν΅μ¬μ μλλ€.
|
| 285 |
+
λ μ€μν κ²μ **μλ΅μ κ²°**μ΄λ€.
|
| 286 |
+
|
| 287 |
+
μ’μ μ νΈ:
|
| 288 |
+
|
| 289 |
+
- νκ΅μ΄λ‘ λ΅νλ€
|
| 290 |
+
- μΈκ³κ΄ μμ λ¨Έλ¬Έλ€
|
| 291 |
+
- μ§§κ³ λΆμκΈ°κ° μλ€
|
| 292 |
+
- λͺ
λ Ήμ΄λ³ λ°μ κ²°μ΄ λ€λ₯΄λ€
|
| 293 |
+
- νμ€ μΌλ° μμ κ°μλ‘ μμ§ μλλ€
|
| 294 |
+
|
| 295 |
+
κ²½κ³ μ νΈ:
|
| 296 |
+
|
| 297 |
+
- `Hello!` λ‘ μμνλ λ²μ© μ±λ΄ ν€
|
| 298 |
+
- `Oracle Database` κ°μ νμ€ μμ λ°μ
|
| 299 |
+
- `AIλ‘μ` κ°μ λ©ν λ°μΈ
|
| 300 |
+
- μμ§μ΄ ν΄μΌ ν μν νμ μ λͺ¨λΈοΏ½οΏ½οΏ½ μ§μ μ μΈ
|
| 301 |
+
|
| 302 |
+
## νκ³μ μ£Όμμ¬ν
|
| 303 |
+
|
| 304 |
+
μ΄ λͺ¨λΈμ νΉμ μ€νμΌκ³Ό μ©λμ λ§μΆ **λλ©μΈ μ μν λͺ¨λΈ**μ΄λ€. λ°λΌμ μλ νκ³λ₯Ό μ΄ν΄νκ³ μ°λ κ²μ΄ μ’λ€.
|
| 305 |
+
|
| 306 |
+
- μΈκ³κ΄ ν€μ κ°νλμ§λ§, μμ λλ©μΈ μ μ λͺ¨λΈ νΉμ±μ **κ³ μ λͺ
μ¬λ₯Ό κ³Όμ₯λκ² μ΄μ΄λΆμ΄κ±°λ λΆμκΈ°λ₯Ό κ³Όμμ±**ν μ μλ€.
|
| 307 |
+
- ν
μ€νΈ MUD μμ¬μλ μ λ§μ§λ§, μΌλ° λΉμν μ§μμλ΅μ μ νλλ₯Ό λͺ©νλ‘ νμ§λ μμλ€.
|
| 308 |
+
- μ₯ν©ν μ€λͺ
μ μ€μ΄κΈ° μν΄ ν둬ννΈμ μμ€ν
λ©μμ§λ₯Ό μ§§κ³ λͺ
ννκ² μ μ§νλ νΈμ΄ μ’λ€.
|
| 309 |
+
- 곡μ λ²€μΉλ§ν¬ κΈ°λ° μ¬νκ°λ λ³λ μμ μ± νκ°λ₯Ό μ΄ μΉ΄λμμ μ 곡νμ§λ μλλ€.
|
| 310 |
+
|
| 311 |
+
## κΆμ₯ μ¬μ© ν¨ν΄
|
| 312 |
+
|
| 313 |
+
μ΄ λͺ¨λΈμ μλμ²λΌ λΆμ΄λ©΄ κ°μ₯ μμ°μ€λ½λ€.
|
| 314 |
+
|
| 315 |
+
1. νλ μ΄μ΄ μ
λ ₯μ μ§§μ ν
μ€νΈ ν둬ννΈλ‘ μ 리νλ€.
|
| 316 |
+
2. μμ§μ μν/νμ μ μ²λ¦¬νλ€.
|
| 317 |
+
3. λͺ¨λΈμ λμ¬, λ¬μ¬, ννΈ, μ μΉ μ€λͺ
μ μμ±νλ€.
|
| 318 |
+
4. μμ§μ λͺ¨λΈ μΆλ ₯μ κ·Έλλ‘ μ°κΈ°λ³΄λ€, νμνλ©΄ νμ²λ¦¬ κ·μΉμ λλ€.
|
| 319 |
+
|
| 320 |
+
νΉν μλ μ μ μ§ν€λ νΈμ΄ μ’λ€.
|
| 321 |
+
|
| 322 |
+
- **μμ§μ΄ κ²°μ ν΄μΌ ν κ²**: νμ€νΈ μ±κ³΅, 보μ, μ ν¬ νμ , λ¬Έ μν
|
| 323 |
+
- **λͺ¨λΈμ΄ ννν΄λ μ’μ κ²**: λΆμκΈ°, λͺ©μ리, μ¬μ΄, λ¨μ, λ¬Έν, μ ν
|
| 324 |
+
|
| 325 |
+
## λΌμ΄μ μ€μ μΆμ²
|
| 326 |
+
|
| 327 |
+
- νμ κΈ°λ° λͺ¨λΈ: [`google/gemma-4-E2B-it`](https://huggingface.co/google/gemma-4-E2B-it)
|
| 328 |
+
- λΌμ΄μ μ€ νκΈ°: `Apache-2.0`
|
| 329 |
+
- GGUF λ° starter package λ μ΄ μ μ₯μ λ°°ν¬ νΈμλ₯Ό μν΄ ν¨κ» ν¬ν¨νλ€.
|
| 330 |
+
|
| 331 |
+
Gemma 4 μ체μ ꡬ쑰μ κΈ°λ³Έ μ¬μ© λ°©μμ 곡μ Gemma 4 μΉ΄λμ Unsloth Gemma 4 λ¬Έμλ₯Ό μ°Έκ³ νλ©΄ μ’λ€.
|
| 332 |
|
| 333 |
+
- [Google Gemma 4 E2B model card](https://huggingface.co/google/gemma-4-E2B-it)
|
| 334 |
+
- [Unsloth Gemma 4 docs](https://unsloth.ai/docs/models/gemma-4)
|
|
|
|
|
|
|
| 335 |
|
| 336 |
+
## ν μ€ μμ½
|
|
|
|
| 337 |
|
| 338 |
+
`gemma4-e2b-mud` λ **νκ΅μ΄ μ°μ£Όνν ν
μ€νΈ MUDμ λΆμκΈ°, NPC λμ¬, μ μΉ μ€λͺ
μ λ‘컬μμλ λΉ λ₯΄κ² μνν μ μκ² λ§λ Gemma 4 E2B νμ λͺ¨λΈ + GGUF + Colab starter package λ¬Άμ**μ΄λ€.
|
|
|
|
|
|