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
| # | |
| # clickhouse-watchdog.sh β ClickHouse ν¬μ€μ²΄ν¬ + μλ μ¬μμ | |
| # crontabμ λ±λ‘νμ¬ 1λΆλ§λ€ μ€ν | |
| # | |
| # Usage: | |
| # */1 * * * * /PROJECT/0325120031_A/ghong/taketimes/llm-bang/scripts/clickhouse-watchdog.sh | |
| # | |
| set -euo pipefail | |
| # ββ μ€μ ββββββββββββββββββββββββββββββββββββββββββββββ | |
| CH_BIN="/PROJECT/0325120031_A/ghong/taketimes/clickhouse-bin" | |
| CH_CONFIG="/PROJECT/0325120031_A/ghong/taketimes/llm-bang/configs/clickhouse-config.xml" | |
| TCP_PORT=9000 | |
| HTTP_PORT=8123 | |
| HOST="127.0.0.1" | |
| LOG_DIR="/tmp/clickhouse" | |
| LOG_FILE="${LOG_DIR}/watchdog.log" | |
| MAX_LOG_SIZE=$((10 * 1024 * 1024)) # 10MB λ‘ν μ΄μ | |
| RESTART_COOLDOWN=180 # μ΄ β μ¬μμ ν μ΄ μκ° λ΄ μ¬μλ λ°©μ§ | |
| LAST_RESTART_FILE="/tmp/clickhouse-last-restart" | |
| HEALTH_CHECK_TIMEOUT=5 # μ΄ β ν¬μ€μ²΄ν¬ curl/query νμμμ | |
| # ββ ν¨μ ββββββββββββββββββββββββββββββββββββββββββββββ | |
| mkdir -p "$LOG_DIR" | |
| log() { | |
| echo "[$(date '+%Y-%m-%d %H:%M:%S')] [clickhouse-watchdog] $*" >> "$LOG_FILE" | |
| } | |
| rotate_log() { | |
| local file="$1" | |
| if [[ -f "$file" ]] && [[ $(stat -c%s "$file" 2>/dev/null || echo 0) -gt $MAX_LOG_SIZE ]]; then | |
| mv "$file" "${file}.old" | |
| log "Log rotated: $file" | |
| fi | |
| } | |
| is_tcp_port_open() { | |
| if command -v ss &>/dev/null; then | |
| ss -tlnH "sport = :${TCP_PORT}" 2>/dev/null | grep -q "$TCP_PORT" | |
| else | |
| (echo > /dev/tcp/"$HOST"/"$TCP_PORT") 2>/dev/null | |
| fi | |
| } | |
| is_http_responding() { | |
| # HTTP μΈν°νμ΄μ€ ν β ClickHouseλ GET / μ "Ok.\n" μλ΅ | |
| if command -v curl &>/dev/null; then | |
| local resp | |
| resp=$(curl -s --max-time "$HEALTH_CHECK_TIMEOUT" "http://${HOST}:${HTTP_PORT}/ping" 2>/dev/null || true) | |
| [[ "$resp" == "Ok." ]] | |
| else | |
| # curl μμΌλ©΄ TCP ν¬νΈλ§ νμΈ | |
| (echo > /dev/tcp/"$HOST"/"$HTTP_PORT") 2>/dev/null | |
| fi | |
| } | |
| is_process_alive() { | |
| # ClickHouse λ΄λΆ watchdog νλ‘μΈμ€λͺ : "clickhouse-watchdog" (λ°μ΄λ리 μ체) | |
| # μ΄ μ€ν¬λ¦½νΈ(clickhouse-watchdog.sh)μ ꡬλΆνκΈ° μν΄ --daemon νλκ·Έ ν¬ν¨ ν¨ν΄ μ¬μ© | |
| pgrep -f "clickhouse.*server.*--daemon" >/dev/null 2>&1 | |
| } | |
| can_execute_query() { | |
| # μ€μ 쿼리 μ€νμΌλ‘ μλ²κ° μλ΅νλμ§ νμΈ | |
| local result | |
| result=$("$CH_BIN" client --port "$TCP_PORT" --query "SELECT 1" 2>/dev/null || true) | |
| [[ "$result" == "1" ]] | |
| } | |
| cooldown_active() { | |
| if [[ -f "$LAST_RESTART_FILE" ]]; then | |
| local last_restart now diff | |
| last_restart=$(cat "$LAST_RESTART_FILE" 2>/dev/null) | |
| now=$(date +%s) | |
| diff=$(( now - last_restart )) | |
| if [[ $diff -lt $RESTART_COOLDOWN ]]; then | |
| return 0 # μΏ¨λ€μ΄ μ€ | |
| fi | |
| fi | |
| return 1 # μΏ¨λ€μ΄ μλ | |
| } | |
| stop_existing() { | |
| log "Stopping existing ClickHouse processes..." | |
| local my_pid=$$ | |
| local pids | |
| # μ μ μ’ λ£ μλ (μλ² νλ‘μΈμ€) | |
| pids=$(pgrep -f "clickhouse.*server.*--daemon" 2>/dev/null | grep -v "^${my_pid}$" || true) | |
| if [[ -n "$pids" ]]; then | |
| log "Sending TERM to PIDs: $pids" | |
| echo "$pids" | xargs kill -TERM 2>/dev/null || true | |
| sleep 3 | |
| # μμ§ μ΄μμμΌλ©΄ κ°μ μ’ λ£ | |
| pids=$(pgrep -f "clickhouse.*server.*--daemon" 2>/dev/null | grep -v "^${my_pid}$" || true) | |
| if [[ -n "$pids" ]]; then | |
| log "Force killing PIDs: $pids" | |
| echo "$pids" | xargs kill -9 2>/dev/null || true | |
| sleep 2 | |
| fi | |
| fi | |
| } | |
| start_server() { | |
| log "Starting ClickHouse server (daemon mode)..." | |
| # κΈ°μ‘΄ νλ‘μΈμ€ μ 리 | |
| stop_existing | |
| # νμν λλ ν 리 μμ± | |
| mkdir -p /tmp/clickhouse/logs | |
| mkdir -p /tmp/clickhouse-tmp | |
| # λ°λͺ¬ λͺ¨λλ‘ μμ | |
| "$CH_BIN" server --config-file="$CH_CONFIG" --daemon | |
| # μμ ν λκΈ° + νμΈ (μ΅λ 15μ΄) | |
| local attempts=0 | |
| local max_attempts=15 | |
| while [[ $attempts -lt $max_attempts ]]; do | |
| sleep 1 | |
| attempts=$((attempts + 1)) | |
| if is_tcp_port_open && can_execute_query; then | |
| date +%s > "$LAST_RESTART_FILE" | |
| log "ClickHouse started successfully (took ${attempts}s)" | |
| return 0 | |
| fi | |
| done | |
| date +%s > "$LAST_RESTART_FILE" | |
| log "ERROR: ClickHouse did not respond within ${max_attempts}s after start" | |
| return 1 | |
| } | |
| # ββ λ©μΈ λ‘μ§ βββββββββββββββββββββββββββββββββββββββββ | |
| rotate_log "$LOG_FILE" | |
| # 1) λ°μ΄λ리 μ‘΄μ¬ νμΈ | |
| if [[ ! -x "$CH_BIN" ]]; then | |
| log "FATAL: ClickHouse binary not found or not executable: $CH_BIN" | |
| exit 1 | |
| fi | |
| # 2) νλ‘μΈμ€ + ν¬νΈ + 쿼리 μ²΄ν¬ | |
| process_ok=false | |
| port_ok=false | |
| query_ok=false | |
| if is_process_alive; then | |
| process_ok=true | |
| fi | |
| if is_tcp_port_open; then | |
| port_ok=true | |
| fi | |
| if $port_ok && can_execute_query; then | |
| query_ok=true | |
| fi | |
| # 3) νλ¨ | |
| if $process_ok && $port_ok && $query_ok; then | |
| # μμ μ μ β μ무κ²λ μ ν¨ | |
| exit 0 | |
| fi | |
| # HTTPλ νμΈ (μ§λ¨ λ‘κ·Έμ©) | |
| http_ok=false | |
| if is_http_responding; then | |
| http_ok=true | |
| fi | |
| # λΉμ μ μν λ‘κΉ | |
| if $process_ok && $port_ok && ! $query_ok; then | |
| log "WARN: Process alive, port open, but query failed. Possible hung state." | |
| elif $process_ok && ! $port_ok; then | |
| log "WARN: Process alive but TCP port $TCP_PORT not listening." | |
| elif ! $process_ok; then | |
| log "WARN: ClickHouse is completely down (no process found)." | |
| fi | |
| log "Status: process=$process_ok port=$port_ok query=$query_ok http=$http_ok" | |
| # 4) μΏ¨λ€μ΄ μ²΄ν¬ | |
| if cooldown_active; then | |
| log "Cooldown active (last restart < ${RESTART_COOLDOWN}s ago). Skipping." | |
| exit 0 | |
| fi | |
| # 5) μ¬μμ | |
| log "Attempting ClickHouse restart..." | |
| if start_server; then | |
| log "ClickHouse restart SUCCESS" | |
| else | |
| log "ClickHouse restart FAILED" | |
| exit 1 | |
| fi | |