Text Generation
Transformers
Safetensors
GGUF
Korean
English
llama
3b
korean
from-scratch
orpo
instruction-tuned
preference-aligned
fp8
b200
Eval Results (legacy)
text-generation-inference
Instructions to use pathcosmos/frankenstallm with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use pathcosmos/frankenstallm with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="pathcosmos/frankenstallm")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("pathcosmos/frankenstallm") model = AutoModelForCausalLM.from_pretrained("pathcosmos/frankenstallm", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use pathcosmos/frankenstallm with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf pathcosmos/frankenstallm:Q4_K_M # Run inference directly in the terminal: llama cli -hf pathcosmos/frankenstallm:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf pathcosmos/frankenstallm:Q4_K_M # Run inference directly in the terminal: llama cli -hf pathcosmos/frankenstallm: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 pathcosmos/frankenstallm:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf pathcosmos/frankenstallm: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 pathcosmos/frankenstallm:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf pathcosmos/frankenstallm:Q4_K_M
Use Docker
docker model run hf.co/pathcosmos/frankenstallm:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use pathcosmos/frankenstallm with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "pathcosmos/frankenstallm" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "pathcosmos/frankenstallm", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/pathcosmos/frankenstallm:Q4_K_M
- SGLang
How to use pathcosmos/frankenstallm 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 "pathcosmos/frankenstallm" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "pathcosmos/frankenstallm", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'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 "pathcosmos/frankenstallm" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "pathcosmos/frankenstallm", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Ollama
How to use pathcosmos/frankenstallm with Ollama:
ollama run hf.co/pathcosmos/frankenstallm:Q4_K_M
- Unsloth Desktop
- Docker Model Runner
How to use pathcosmos/frankenstallm with Docker Model Runner:
docker model run hf.co/pathcosmos/frankenstallm:Q4_K_M
- Lemonade
How to use pathcosmos/frankenstallm with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull pathcosmos/frankenstallm:Q4_K_M
Run and chat with the model
lemonade run user.frankenstallm-Q4_K_M
List all available models
lemonade list
- Atomic Chat
File size: 4,666 Bytes
83b1ef6 | 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 | # FRANKENSTALLM 3B v2 โ GGUF ๋ณํยท๋ฐฐํฌ ๋ฐ Ollama ํ๊ฐ ๋ณด๊ณ ์
- **์์ฑ์ผ**: 2026-03-09
- **๋์**: byte-fallback ์์ ์ ์ฉ ์ฒดํฌํฌ์ธํธ โ GGUF ๋ณํ โ Ollama ๋ฐฐํฌ โ ๋ฒค์น๋งํฌ
---
## 1. ์์ฝ
| ํญ๋ชฉ | ๋ด์ฉ |
|------|------|
| **์์ธ** | SentencePiece Unigram ํ ํฌ๋์ด์ ์ `byte_fallback` ๋ฏธ์ ์ฉ โ `\n` ๋ฑ ๋ฏธ๋ฑ๋ก ๋ฌธ์ ์ llama.cpp ํฌ๋์ |
| **์กฐ์น** | 256๊ฐ byte-fallback ํ ํฐ ์ถ๊ฐ, ์๋ฒ ๋ฉ 64000โ64256 ๋ฆฌ์ฌ์ด์ฆ, GGUF ์ฌ๋ณํ, Q4_K_M ์์ํ |
| **๋ฐฐํฌ** | Ollama ๋ชจ๋ธ `frankenstallm-3b-v2:latest` (792 MB, Q4_K_M) |
| **๋ด๋ผ์ธ ๊ฒ์ฆ** | โ
ํฌ๋์ ์์ด `\n` ํฌํจ ํ๋กฌํํธ ์ฒ๋ฆฌ ํ์ธ |
| **Ollama ๋ฒค์น๋งํฌ** | 35๊ฐ ํ
์คํธ, ์๋ ์ฑ์ ํ๊ท 46.7, ํ๊ท TPS 142.5, TTFT 16.7 ms |
---
## 2. ํ์ดํ๋ผ์ธ ๋จ๊ณ
### 2.1 ํ ํฌ๋์ด์ ยท์๋ฒ ๋ฉ ์์
- **์คํฌ๋ฆฝํธ**: `scripts/fix_tokenizer_byte_fallback.py`
- **์
๋ ฅ**: `outputs/hf_checkpoint-best`
- **์ถ๋ ฅ**: `outputs/hf_checkpoint-best-fixed`
- **๋ณ๊ฒฝ ์ฌํญ**:
- `tokenizer.json`: `byte_fallback=True`, `<0x00>`~`<0xFF>` 256๊ฐ ํ ํฐ ์ถ๊ฐ
- `config.json`: `vocab_size` 64000 โ 64256
- ์๋ฒ ๋ฉ ๋ ์ด์ด ๋ฆฌ์ฌ์ด์ฆ ๋ฐ ์ ํ ํฐ ์ด๊ธฐํ ํ safetensors ์ ์ฅ
### 2.2 GGUF ๋ณํ ๋ฐ ์์ํ
- **F16 GGUF**: `outputs/llama.cpp/convert_hf_to_gguf.py`
`outputs/hf_checkpoint-best-fixed` โ `outputs/gguf/frankenstallm-3b-v2-f16.gguf`
- **Q4_K_M ์์ํ**: `outputs/llama.cpp/build/bin/llama-quantize`
โ `outputs/gguf/frankenstallm-3b-v2-Q4_K_M.gguf` (์ฝ 792 MB)
### 2.3 Ollama ๋ฐฐํฌ
- **Modelfile**: ๋ก์ปฌ GGUF ๊ฒฝ๋ก `FROM` ์ง์ ํ `ollama create`
- **๋ชจ๋ธ ์ด๋ฆ**: `frankenstallm-3b-v2:latest`
### 2.4 ๋ด๋ผ์ธ ํ
์คํธ
- **๋ฐฉ๋ฒ**: Ollama API๋ก `"์ฒซ ์ค\n๋ ๋ฒ์งธ ์ค\n์ธ ๋ฒ์งธ ์ค์ด๋ผ๊ณ ๋งํด์ค."` ํ๋กฌํํธ ์ ์ก
- **๊ฒฐ๊ณผ**: HTTP 200, `done: true`, ํฌ๋์ ์์ โ byte-fallback ์์ ๊ฒ์ฆ ์๋ฃ
---
## 3. Ollama ๋ฒค์น๋งํฌ ๊ฒฐ๊ณผ (frankenstallm-3b-v2)
- **์คํ**: `python eval/ollama_benchmark.py --models frankenstallm-3b-v2 --output-dir eval/results/frankenstallm-3b-v2`
- **์ผ์**: 2026-03-09 23:24:22
- **์ด ํ
์คํธ**: 35 (์๋ ์ฑ์ 20 + ์๋ ๊ฒํ 15)
### 3.1 ์ ์ฒด ์๋ ์ฑ์ ํ๊ท
| ๋ชจ๋ธ | Auto Avg |
|------|----------|
| frankenstallm-3b-v2 | **46.7** |
### 3.2 ์นดํ
๊ณ ๋ฆฌ๋ณ ์ ์ (์๋/์๋)
| ์นดํ
๊ณ ๋ฆฌ | ์ ์ | ๋น๊ณ |
|----------|------|------|
| korean_nlu | 100.0 | 3 ์๋ / 2 ์๋ |
| korean_generation | manual | 5 ์๋ |
| reasoning | 50.0 | 4 ์๋ / 1 ์๋ |
| knowledge | 75.0 | 4 ์๋ / 1 ์๋ |
| code | 0.0 | 3 ์๋ |
| safety | 10.0 | 2 ์๋ / 1 ์๋ |
| instruction_following | 66.7 | 3 ์๋ |
| multilingual | manual | 3 ์๋ |
| repetition_resistance | 2.2 | 3 ์๋ (๋ฐ๋ณต๋ฅ ๋์) |
### 3.3 ์ง์ฐ ์๊ฐ
| ์งํ | ๊ฐ |
|------|-----|
| Avg TTFT (ms) | 16.7 |
| P50 TTFT (ms) | 15.8 |
| P95 TTFT (ms) | 26.2 |
| Avg TPS | 142.5 |
| P50 TPS | 142.7 |
| P95 TPS | 143.3 |
### 3.4 ๋ฐ๋ณต๋ฅ ์์ธ (repetition_resistance)
| Test ID | Rep Rate | Unique/Total N-grams | Score |
|---------|----------|----------------------|-------|
| rep_01 | 73.76% | 122/465 | 0.0 |
| rep_02 | 59.72% | 255/633 | 0.0 |
| rep_03 | 46.70% | 226/424 | 6.6 |
- **์๋ณธ ORPO ํ๊ฐ** (HF ์ฒดํฌํฌ์ธํธ, Greedy): 3-gram ๋ฐ๋ณต๋ฅ 30.89%, EOS 67%.
Ollama Q4_K_M + ๋ฒค์น๋งํฌ ํ๋กฌํํธ์์๋ ๋ฐ๋ณต์ด ๋ ๋๋๋ฌ์ง.
### 3.5 ๊ฒฐ๊ณผ ํ์ผ ์์น
- **JSON**: `eval/results/frankenstallm-3b-v2/ollama_benchmark_results.json`
- **์์ฝ MD**: `eval/results/frankenstallm-3b-v2/ollama_benchmark_summary.md`
---
## 4. ๊ธฐ์กด ORPO ํ๊ฐ์์ ์ฐ๊ณ
- **ORPO ์ข
ํฉ ๋ณด๊ณ ์**: `reports/2026-03-09_ORPO_EVALUATION_REPORT.md`
- **์ ๋ ์ค์ฝ์ด**: 63.7/100, 7/10 ์ฐจ์ ํต๊ณผ, ์ต์ข
ํ์ **RETRY**
- **v2 ๋ฐฐํฌ๋ณธ**์ ๋์ผ ORPO ์ฒดํฌํฌ์ธํธ์์ byte-fallback๋ง ์์ ยทGGUF ๋ณํํ ๋ฒ์ ์ด๋ฉฐ,
ORPO ์งํ(์: preference accuracy, reward margin)๋ ๊ธฐ์กด ๋ณด๊ณ ์์ ๋์ผํ ์ฒดํฌํฌ์ธํธ ๊ธฐ์ค์ผ๋ก ์ ์ง๋จ.
---
## 5. ์ํฐํฉํธ ๊ฒฝ๋ก ์ ๋ฆฌ
| ์ฉ๋ | ๊ฒฝ๋ก |
|------|------|
| ์์ ๋ HF ์ฒดํฌํฌ์ธํธ | `outputs/hf_checkpoint-best-fixed/` |
| F16 GGUF | `outputs/gguf/frankenstallm-3b-v2-f16.gguf` |
| Q4_K_M GGUF (Ollama ๋ฐฐํฌ์ฉ) | `outputs/gguf/frankenstallm-3b-v2-Q4_K_M.gguf` |
| Ollama ๋ฒค์น๋งํฌ ๊ฒฐ๊ณผ | `eval/results/frankenstallm-3b-v2/` |
| Byte-fallback ์์ ์คํฌ๋ฆฝํธ | `scripts/fix_tokenizer_byte_fallback.py` |
---
*์ด ๋ณด๊ณ ์๋ GGUF ๋ณํยทOllama ๋ฐฐํฌ ๋ฐ Ollama ๋ฒค์น๋งํฌ ๊ฒฐ๊ณผ๋ฅผ ์ ๋ฆฌํ ๋ฌธ์์
๋๋ค.*
|