Instructions to use Vi-LAB/KenT-300M-Base with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Vi-LAB/KenT-300M-Base with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Vi-LAB/KenT-300M-Base", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("Vi-LAB/KenT-300M-Base", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Vi-LAB/KenT-300M-Base with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Vi-LAB/KenT-300M-Base" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Vi-LAB/KenT-300M-Base", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Vi-LAB/KenT-300M-Base
- SGLang
How to use Vi-LAB/KenT-300M-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 "Vi-LAB/KenT-300M-Base" \ --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": "Vi-LAB/KenT-300M-Base", "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 "Vi-LAB/KenT-300M-Base" \ --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": "Vi-LAB/KenT-300M-Base", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Vi-LAB/KenT-300M-Base with Docker Model Runner:
docker model run hf.co/Vi-LAB/KenT-300M-Base
Update README.md
Browse files
README.md
CHANGED
|
@@ -10,6 +10,10 @@ tags:
|
|
| 10 |
- dct
|
| 11 |
- swiglu
|
| 12 |
- custom_code
|
|
|
|
|
|
|
|
|
|
|
|
|
| 13 |
---
|
| 14 |
|
| 15 |
# KenT-300M-Base
|
|
@@ -41,6 +45,8 @@ D là ma trận DCT-II trực chuẩn cố định (hàng = tần số, vector h
|
|
| 41 |
| tham số | ≈ 302.42M (embedding 67.55M) |
|
| 42 |
| trạng thái giải mã | H shape (13, 1344), O(1) theo độ dài |
|
| 43 |
|
|
|
|
|
|
|
| 44 |
EMA khởi tạo theo cấp số nhân từ 0.5 (tap đầu, feature đầu) đến 0.01 (tap cuối, feature cuối); vẫn học được.
|
| 45 |
EMA chạy FP32 bằng affine-scan log-depth, kết quả bằng đúng hồi quy tuần tự.
|
| 46 |
|
|
@@ -50,4 +56,4 @@ tok = AutoTokenizer.from_pretrained("Vi-LAB/KenT-300M-Base", trust_remote_code=T
|
|
| 50 |
model = AutoModelForCausalLM.from_pretrained("Vi-LAB/KenT-300M-Base", trust_remote_code=True)
|
| 51 |
```
|
| 52 |
|
| 53 |
-
Hoặc `python infer.py --model Vi-LAB/KenT-300M-Base --prompt "Today the weather is"`.
|
|
|
|
| 10 |
- dct
|
| 11 |
- swiglu
|
| 12 |
- custom_code
|
| 13 |
+
- base
|
| 14 |
+
datasets:
|
| 15 |
+
- wikimedia/wikipedia
|
| 16 |
+
- HuggingFaceFW/fineweb-edu
|
| 17 |
---
|
| 18 |
|
| 19 |
# KenT-300M-Base
|
|
|
|
| 45 |
| tham số | ≈ 302.42M (embedding 67.55M) |
|
| 46 |
| trạng thái giải mã | H shape (13, 1344), O(1) theo độ dài |
|
| 47 |
|
| 48 |
+

|
| 49 |
+
|
| 50 |
EMA khởi tạo theo cấp số nhân từ 0.5 (tap đầu, feature đầu) đến 0.01 (tap cuối, feature cuối); vẫn học được.
|
| 51 |
EMA chạy FP32 bằng affine-scan log-depth, kết quả bằng đúng hồi quy tuần tự.
|
| 52 |
|
|
|
|
| 56 |
model = AutoModelForCausalLM.from_pretrained("Vi-LAB/KenT-300M-Base", trust_remote_code=True)
|
| 57 |
```
|
| 58 |
|
| 59 |
+
Hoặc `python infer.py --model Vi-LAB/KenT-300M-Base --prompt "Today the weather is"`.
|