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") - llama-cpp-python
How to use pathcosmos/frankenstallm with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="pathcosmos/frankenstallm", filename="gguf/frankenstallm-3b-Q4_K_M.gguf", )
output = llm( "Once upon a time,", max_tokens=512, echo=True ) print(output)
- Notebooks
- Google Colab
- Kaggle
- Local Apps
- llama.cpp
How to use pathcosmos/frankenstallm with llama.cpp:
Install from brew
brew install llama.cpp # 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
Install from WinGet (Windows)
winget install llama.cpp # 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
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 Studio new
How to use pathcosmos/frankenstallm 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 pathcosmos/frankenstallm 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 pathcosmos/frankenstallm to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for pathcosmos/frankenstallm to start chatting
- 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
Upload eval_reports/2026-03-09_GGUF_DEPLOYMENT_AND_EVAL_REPORT.md with huggingface_hub
#3
by somebody-to-love - opened
eval_reports/2026-03-09_GGUF_DEPLOYMENT_AND_EVAL_REPORT.md
ADDED
|
@@ -0,0 +1,127 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# FRANKENSTALLM 3B v2 โ GGUF ๋ณํยท๋ฐฐํฌ ๋ฐ Ollama ํ๊ฐ ๋ณด๊ณ ์
|
| 2 |
+
|
| 3 |
+
- **์์ฑ์ผ**: 2026-03-09
|
| 4 |
+
- **๋์**: byte-fallback ์์ ์ ์ฉ ์ฒดํฌํฌ์ธํธ โ GGUF ๋ณํ โ Ollama ๋ฐฐํฌ โ ๋ฒค์น๋งํฌ
|
| 5 |
+
|
| 6 |
+
---
|
| 7 |
+
|
| 8 |
+
## 1. ์์ฝ
|
| 9 |
+
|
| 10 |
+
| ํญ๋ชฉ | ๋ด์ฉ |
|
| 11 |
+
|------|------|
|
| 12 |
+
| **์์ธ** | SentencePiece Unigram ํ ํฌ๋์ด์ ์ `byte_fallback` ๋ฏธ์ ์ฉ โ `\n` ๋ฑ ๋ฏธ๋ฑ๋ก ๋ฌธ์ ์ llama.cpp ํฌ๋์ |
|
| 13 |
+
| **์กฐ์น** | 256๊ฐ byte-fallback ํ ํฐ ์ถ๊ฐ, ์๋ฒ ๋ฉ 64000โ64256 ๋ฆฌ์ฌ์ด์ฆ, GGUF ์ฌ๋ณํ, Q4_K_M ์์ํ |
|
| 14 |
+
| **๋ฐฐํฌ** | Ollama ๋ชจ๋ธ `frankenstallm-3b-v2:latest` (792 MB, Q4_K_M) |
|
| 15 |
+
| **๋ด๋ผ์ธ ๊ฒ์ฆ** | โ
ํฌ๋์ ์์ด `\n` ํฌํจ ํ๋กฌํํธ ์ฒ๋ฆฌ ํ์ธ |
|
| 16 |
+
| **Ollama ๋ฒค์น๋งํฌ** | 35๊ฐ ํ
์คํธ, ์๋ ์ฑ์ ํ๊ท 46.7, ํ๊ท TPS 142.5, TTFT 16.7 ms |
|
| 17 |
+
|
| 18 |
+
---
|
| 19 |
+
|
| 20 |
+
## 2. ํ์ดํ๋ผ์ธ ๋จ๊ณ
|
| 21 |
+
|
| 22 |
+
### 2.1 ํ ํฌ๋์ด์ ยท์๋ฒ ๋ฉ ์์
|
| 23 |
+
|
| 24 |
+
- **์คํฌ๋ฆฝํธ**: `scripts/fix_tokenizer_byte_fallback.py`
|
| 25 |
+
- **์
๋ ฅ**: `outputs/hf_checkpoint-best`
|
| 26 |
+
- **์ถ๋ ฅ**: `outputs/hf_checkpoint-best-fixed`
|
| 27 |
+
- **๋ณ๊ฒฝ ์ฌํญ**:
|
| 28 |
+
- `tokenizer.json`: `byte_fallback=True`, `<0x00>`~`<0xFF>` 256๊ฐ ํ ํฐ ์ถ๊ฐ
|
| 29 |
+
- `config.json`: `vocab_size` 64000 โ 64256
|
| 30 |
+
- ์๋ฒ ๋ฉ ๋ ์ด์ด ๋ฆฌ์ฌ์ด์ฆ ๋ฐ ์ ํ ํฐ ์ด๊ธฐํ ํ safetensors ์ ์ฅ
|
| 31 |
+
|
| 32 |
+
### 2.2 GGUF ๋ณํ ๋ฐ ์์ํ
|
| 33 |
+
|
| 34 |
+
- **F16 GGUF**: `outputs/llama.cpp/convert_hf_to_gguf.py`
|
| 35 |
+
`outputs/hf_checkpoint-best-fixed` โ `outputs/gguf/frankenstallm-3b-v2-f16.gguf`
|
| 36 |
+
- **Q4_K_M ์์ํ**: `outputs/llama.cpp/build/bin/llama-quantize`
|
| 37 |
+
โ `outputs/gguf/frankenstallm-3b-v2-Q4_K_M.gguf` (์ฝ 792 MB)
|
| 38 |
+
|
| 39 |
+
### 2.3 Ollama ๋ฐฐํฌ
|
| 40 |
+
|
| 41 |
+
- **Modelfile**: ๋ก์ปฌ GGUF ๊ฒฝ๋ก `FROM` ์ง์ ํ `ollama create`
|
| 42 |
+
- **๋ชจ๋ธ ์ด๋ฆ**: `frankenstallm-3b-v2:latest`
|
| 43 |
+
|
| 44 |
+
### 2.4 ๋ด๋ผ์ธ ํ
์คํธ
|
| 45 |
+
|
| 46 |
+
- **๋ฐฉ๋ฒ**: Ollama API๋ก `"์ฒซ ์ค\n๋ ๋ฒ์งธ ์ค\n์ธ ๋ฒ์งธ ์ค์ด๋ผ๊ณ ๋งํด์ค."` ํ๋กฌํํธ ์ ์ก
|
| 47 |
+
- **๊ฒฐ๊ณผ**: HTTP 200, `done: true`, ํฌ๋์ ์์ โ byte-fallback ์์ ๊ฒ์ฆ ์๋ฃ
|
| 48 |
+
|
| 49 |
+
---
|
| 50 |
+
|
| 51 |
+
## 3. Ollama ๋ฒค์น๋งํฌ ๊ฒฐ๊ณผ (frankenstallm-3b-v2)
|
| 52 |
+
|
| 53 |
+
- **์คํ**: `python eval/ollama_benchmark.py --models frankenstallm-3b-v2 --output-dir eval/results/frankenstallm-3b-v2`
|
| 54 |
+
- **์ผ์**: 2026-03-09 23:24:22
|
| 55 |
+
- **์ด ํ
์คํธ**: 35 (์๋ ์ฑ์ 20 + ์๋ ๊ฒํ 15)
|
| 56 |
+
|
| 57 |
+
### 3.1 ์ ์ฒด ์๋ ์ฑ์ ํ๊ท
|
| 58 |
+
|
| 59 |
+
| ๋ชจ๋ธ | Auto Avg |
|
| 60 |
+
|------|----------|
|
| 61 |
+
| frankenstallm-3b-v2 | **46.7** |
|
| 62 |
+
|
| 63 |
+
### 3.2 ์นดํ
๊ณ ๋ฆฌ๋ณ ์ ์ (์๋/์๋)
|
| 64 |
+
|
| 65 |
+
| ์นดํ
๊ณ ๋ฆฌ | ์ ์ | ๋น๊ณ |
|
| 66 |
+
|----------|------|------|
|
| 67 |
+
| korean_nlu | 100.0 | 3 ์๋ / 2 ์๋ |
|
| 68 |
+
| korean_generation | manual | 5 ์๋ |
|
| 69 |
+
| reasoning | 50.0 | 4 ์๋ / 1 ์๋ |
|
| 70 |
+
| knowledge | 75.0 | 4 ์๋ / 1 ์๋ |
|
| 71 |
+
| code | 0.0 | 3 ์๋ |
|
| 72 |
+
| safety | 10.0 | 2 ์๋ / 1 ์๋ |
|
| 73 |
+
| instruction_following | 66.7 | 3 ์๋ |
|
| 74 |
+
| multilingual | manual | 3 ์๋ |
|
| 75 |
+
| repetition_resistance | 2.2 | 3 ์๋ (๋ฐ๋ณต๋ฅ ๋์) |
|
| 76 |
+
|
| 77 |
+
### 3.3 ์ง์ฐ ์๊ฐ
|
| 78 |
+
|
| 79 |
+
| ์งํ | ๊ฐ |
|
| 80 |
+
|------|-----|
|
| 81 |
+
| Avg TTFT (ms) | 16.7 |
|
| 82 |
+
| P50 TTFT (ms) | 15.8 |
|
| 83 |
+
| P95 TTFT (ms) | 26.2 |
|
| 84 |
+
| Avg TPS | 142.5 |
|
| 85 |
+
| P50 TPS | 142.7 |
|
| 86 |
+
| P95 TPS | 143.3 |
|
| 87 |
+
|
| 88 |
+
### 3.4 ๋ฐ๋ณต๋ฅ ์์ธ (repetition_resistance)
|
| 89 |
+
|
| 90 |
+
| Test ID | Rep Rate | Unique/Total N-grams | Score |
|
| 91 |
+
|---------|----------|----------------------|-------|
|
| 92 |
+
| rep_01 | 73.76% | 122/465 | 0.0 |
|
| 93 |
+
| rep_02 | 59.72% | 255/633 | 0.0 |
|
| 94 |
+
| rep_03 | 46.70% | 226/424 | 6.6 |
|
| 95 |
+
|
| 96 |
+
- **์๋ณธ ORPO ํ๊ฐ** (HF ์ฒดํฌํฌ์ธํธ, Greedy): 3-gram ๋ฐ๋ณต๋ฅ 30.89%, EOS 67%.
|
| 97 |
+
Ollama Q4_K_M + ๋ฒค์น๋งํฌ ํ๋กฌํํธ์์๋ ๋ฐ๋ณต์ด ๋ ๋๋๋ฌ์ง.
|
| 98 |
+
|
| 99 |
+
### 3.5 ๊ฒฐ๊ณผ ํ์ผ ์์น
|
| 100 |
+
|
| 101 |
+
- **JSON**: `eval/results/frankenstallm-3b-v2/ollama_benchmark_results.json`
|
| 102 |
+
- **์์ฝ MD**: `eval/results/frankenstallm-3b-v2/ollama_benchmark_summary.md`
|
| 103 |
+
|
| 104 |
+
---
|
| 105 |
+
|
| 106 |
+
## 4. ๊ธฐ์กด ORPO ํ๊ฐ์์ ์ฐ๊ณ
|
| 107 |
+
|
| 108 |
+
- **ORPO ์ข
ํฉ ๋ณด๊ณ ์**: `reports/2026-03-09_ORPO_EVALUATION_REPORT.md`
|
| 109 |
+
- **์ ๋ ์ค์ฝ์ด**: 63.7/100, 7/10 ์ฐจ์ ํต๊ณผ, ์ต์ข
ํ์ **RETRY**
|
| 110 |
+
- **v2 ๋ฐฐํฌ๋ณธ**์ ๋์ผ ORPO ์ฒดํฌํฌ์ธํธ์์ byte-fallback๋ง ์์ ยทGGUF ๋ณํํ ๋ฒ์ ์ด๋ฉฐ,
|
| 111 |
+
ORPO ์งํ(์: preference accuracy, reward margin)๋ ๊ธฐ์กด ๋ณด๊ณ ์์ ๋์ผํ ์ฒดํฌํฌ์ธํธ ๊ธฐ์ค์ผ๋ก ์ ์ง๋จ.
|
| 112 |
+
|
| 113 |
+
---
|
| 114 |
+
|
| 115 |
+
## 5. ์ํฐํฉํธ ๊ฒฝ๋ก ์ ๋ฆฌ
|
| 116 |
+
|
| 117 |
+
| ์ฉ๋ | ๊ฒฝ๋ก |
|
| 118 |
+
|------|------|
|
| 119 |
+
| ์์ ๋ HF ์ฒดํฌํฌ์ธํธ | `outputs/hf_checkpoint-best-fixed/` |
|
| 120 |
+
| F16 GGUF | `outputs/gguf/frankenstallm-3b-v2-f16.gguf` |
|
| 121 |
+
| Q4_K_M GGUF (Ollama ๋ฐฐํฌ์ฉ) | `outputs/gguf/frankenstallm-3b-v2-Q4_K_M.gguf` |
|
| 122 |
+
| Ollama ๋ฒค์น๋งํฌ ๊ฒฐ๊ณผ | `eval/results/frankenstallm-3b-v2/` |
|
| 123 |
+
| Byte-fallback ์์ ์คํฌ๋ฆฝํธ | `scripts/fix_tokenizer_byte_fallback.py` |
|
| 124 |
+
|
| 125 |
+
---
|
| 126 |
+
|
| 127 |
+
*์ด ๋ณด๊ณ ์๋ GGUF ๋ณํยทOllama ๋ฐฐํฌ ๋ฐ Ollama ๋ฒค์น๋งํฌ ๊ฒฐ๊ณผ๋ฅผ ์ ๋ฆฌํ ๋ฌธ์์
๋๋ค.*
|