Text Generation
Transformers
Safetensors
Chinese
English
mistral
Taiwan
ROC
zhtw
F1
Formosa-1
Mistral
continued-pretraining
conversational
text-generation-inference
Instructions to use lianghsun/F1-24B-Base with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use lianghsun/F1-24B-Base with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="lianghsun/F1-24B-Base") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("lianghsun/F1-24B-Base") model = AutoModelForCausalLM.from_pretrained("lianghsun/F1-24B-Base") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.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(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use lianghsun/F1-24B-Base with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "lianghsun/F1-24B-Base" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "lianghsun/F1-24B-Base", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/lianghsun/F1-24B-Base
- SGLang
How to use lianghsun/F1-24B-Base 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 "lianghsun/F1-24B-Base" \ --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": "lianghsun/F1-24B-Base", "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 "lianghsun/F1-24B-Base" \ --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": "lianghsun/F1-24B-Base", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use lianghsun/F1-24B-Base with Docker Model Runner:
docker model run hf.co/lianghsun/F1-24B-Base
Model Card for F1-24B-Base
F1-24B-Base 是 Formosa-1(F1) 系列中的 24B 基底模型,以 mistralai/Mistral-Small-24B-Base-2501 為基底,針對繁體中文與中華民國台灣語境完成大規模持續預訓練(continued pretraining, CPT),作為 F1-24B-Instruct、F1-24B-Reasoner 等下游模型的繁中底座。
⚠️ 規格重點: 本模型為 24B 參數、純文本單模態,僅做 CPT、未做指令微調,需自行 SFT 後才有對話能力。
Model Details
Mistral-Small-24B 是兼顧能力與部署成本的中型開源模型,但其原生繁中與台灣語境覆蓋不足。F1-24B-Base 將 Formosa-1 系列的繁中語料注入 Mistral-Small-24B 之參數,使下游任務能在熟悉繁中與台灣語境之底座上做後續訓練。
核心特點 (Key Features)
- 24B 級繁中底座:在能力與部署成本之間取得平衡,可作為企業級繁中模型的微調起點。
- F1 系列家族基底:作為 Instruct、Reasoner、領域微調(如 F1-24B-Instruct-Cybersecurity)的共同底座。
- 大規模 CPT:以多卡分散式訓練於繁中語料完成持續預訓練。
Model Description
- Developed by: Liang Hsun Huang
- Funded by: APMIC
- Base model: mistralai/Mistral-Small-24B-Base-2501
- Model type: MistralForCausalLM (Transformers)
- Language(s) (NLP): Traditional Chinese, English
- License: MIT
Model Sources
- Repository: lianghsun/F1-24B-Base
Citation
@misc{f1_24b_base,
title = {F1-24B-Base: A Traditional Chinese Continued-Pretrained Mistral-24B Model for Taiwan},
author = {Huang, Liang Hsun},
year = {2025},
howpublished = {\url{https://huggingface.co/lianghsun/F1-24B-Base}}
}
Acknowledge
- 特此感謝 APMIC 的算力支援。
Model Card Authors
Model Card Contact
- Downloads last month
- -