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 README.md with huggingface_hub
Browse files
README.md
CHANGED
|
@@ -1,3 +1,68 @@
|
|
| 1 |
-
---
|
| 2 |
-
|
| 3 |
-
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
language:
|
| 3 |
+
- ko
|
| 4 |
+
license: other
|
| 5 |
+
tags:
|
| 6 |
+
- llm
|
| 7 |
+
- korean
|
| 8 |
+
- orpo
|
| 9 |
+
- gguf
|
| 10 |
+
---
|
| 11 |
+
|
| 12 |
+
# FRANKENSTALLM 3B v2 (Byte-Fallback Fixed)
|
| 13 |
+
|
| 14 |
+
ํ๊ตญ์ด ์ค์ฌ **FRANKENSTALLM 3B** ORPO ํ์ธํ๋ ์ฒดํฌํฌ์ธํธ์ **byte-fallback ํ ํฐ 256๊ฐ**๋ฅผ ์ถ๊ฐํ ๋ฒ์ ์
๋๋ค.
|
| 15 |
+
llama.cpp/GGUF ์ถ๋ก ์ ์ค๋ฐ๊ฟ(`\n`) ๋ฑ ๋ฏธ๋ฑ๋ก ๋ฌธ์๋ก ์ธํ ํฌ๋์๋ฅผ ๋ฐฉ์งํ๊ธฐ ์ํด ์ฌ์ฉํฉ๋๋ค.
|
| 16 |
+
|
| 17 |
+
## ๋ชจ๋ธ ์์ธ
|
| 18 |
+
|
| 19 |
+
| ํญ๋ชฉ | ๊ฐ |
|
| 20 |
+
|------|-----|
|
| 21 |
+
| **Architecture** | LlamaForCausalLM |
|
| 22 |
+
| **Params** | ~3B |
|
| 23 |
+
| **Hidden size** | 2048 |
|
| 24 |
+
| **Layers** | 24 |
|
| 25 |
+
| **Attention heads** | 16 |
|
| 26 |
+
| **KV heads** | 4 |
|
| 27 |
+
| **Max position** | 4096 |
|
| 28 |
+
| **Vocab size** | **64,256** (64,000 + 256 byte-fallback) |
|
| 29 |
+
| **Training** | ORPO (SFT โ ORPO) |
|
| 30 |
+
|
| 31 |
+
## ๋ณ๊ฒฝ ์ฌํญ (v2)
|
| 32 |
+
|
| 33 |
+
- ํ ํฌ๋์ด์ : `byte_fallback=True`, `<0x00>`~`<0xFF>` 256๊ฐ ํ ํฐ ์ถ๊ฐ
|
| 34 |
+
- ์๋ฒ ๋ฉ: 64,000 โ 64,256 ๋ฆฌ์ฌ์ด์ฆ, ์ ํ ํฐ ์ด๊ธฐํ
|
| 35 |
+
- GGUF ๋ณํยทOllama ๋ฐฐํฌ ์ ๋ด๋ผ์ธ ํฌํจ ์
๋ ฅ ์ ์ ์ฒ๋ฆฌ ํ์ธ
|
| 36 |
+
|
| 37 |
+
## ORPO ํ๊ฐ ์์ฝ (๋์ผ ์ฒดํฌํฌ์ธํธ ๊ธฐ์ค)
|
| 38 |
+
|
| 39 |
+
- **ํ๊ฐ ์ผ์**: 2026-03-09
|
| 40 |
+
- **Preference Accuracy**: 76.02%
|
| 41 |
+
- **Reward Margin**: 0.6100
|
| 42 |
+
- **Eval Loss**: 1.7910 โ 1.6250
|
| 43 |
+
- **KoBEST (0-shot) ํ๊ท **: 52.75%
|
| 44 |
+
- **์์ฑ ํ์ง**: Greedy 3-gram ๋ฐ๋ณต๋ฅ 30.89%, EOS ์ข
๋ฃ์จ 66.67%
|
| 45 |
+
- **PPL Forgetting**: ์ต๋ 4.1% (๊ธฐ์ค <15%)
|
| 46 |
+
- **์ข
ํฉ**: 7/10 ์ฐจ์ ํต๊ณผ, ์ ๋ ์ค์ฝ์ด 63.7/100
|
| 47 |
+
|
| 48 |
+
์์ธ: ํ๋ก์ ํธ ๋ด `reports/2026-03-09_ORPO_EVALUATION_REPORT.md` ์ฐธ๊ณ .
|
| 49 |
+
|
| 50 |
+
## Ollama ๋ฐฐํฌ ๋ฒค์น๋งํฌ (Q4_K_M, 2026-03-09)
|
| 51 |
+
|
| 52 |
+
- **๋ชจ๋ธ๋ช
**: `frankenstallm-3b-v2`
|
| 53 |
+
- **ํ
์คํธ ์**: 35 (์๋ 20 + ์๋ 15)
|
| 54 |
+
- **์๋ ์ฑ์ ํ๊ท **: 46.7
|
| 55 |
+
- **์นดํ
๊ณ ๋ฆฌ**: korean_nlu 100.0, reasoning 50.0, knowledge 75.0, instruction_following 66.7, code 0.0, safety 10.0, repetition_resistance 2.2 ๋ฑ
|
| 56 |
+
- **์ง์ฐ**: Avg TTFT 16.7 ms, Avg TPS 142.5
|
| 57 |
+
|
| 58 |
+
์์ธ: `reports/2026-03-09_GGUF_DEPLOYMENT_AND_EVAL_REPORT.md`, `eval/results/frankenstallm-3b-v2/ollama_benchmark_summary.md`
|
| 59 |
+
|
| 60 |
+
## ์ฌ์ฉ
|
| 61 |
+
|
| 62 |
+
- **Transformers**: ์ด ์ฒดํฌํฌ์ธํธ๋ฅผ ๊ทธ๋๋ก `from_pretrained(...)` ๋ก ๋ก๋ ๊ฐ๋ฅ.
|
| 63 |
+
- **GGUF**: `scripts/fix_tokenizer_byte_fallback.py` ์ ์ฉ ํ `convert_hf_to_gguf.py` โ `llama-quantize` ๋ก ๋ณํํ v2 ํ์ดํ๋ผ์ธ ์ฌ์ฉ ๊ถ์ฅ.
|
| 64 |
+
์ด๋ฏธ ๋ณํ๋ Q4_K_M GGUF๋ Ollama์์ `frankenstallm-3b-v2` ๋ก ๋ฐฐํฌ ๊ฐ๋ฅ.
|
| 65 |
+
|
| 66 |
+
## ๋ผ์ด์ ์ค
|
| 67 |
+
|
| 68 |
+
ํ๋ก์ ํธ(FRANKENSTALLM) ๋ผ์ด์ ์ค์ ๋ฐ๋ฆ
๋๋ค.
|