Instructions to use khtsly/d with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use khtsly/d with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="khtsly/d", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("khtsly/d", trust_remote_code=True) model = AutoModelForCausalLM.from_pretrained("khtsly/d", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use khtsly/d with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "khtsly/d" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "khtsly/d", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/khtsly/d
- SGLang
How to use khtsly/d 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 "khtsly/d" \ --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": "khtsly/d", "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 "khtsly/d" \ --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": "khtsly/d", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use khtsly/d with Docker Model Runner:
docker model run hf.co/khtsly/d
periodic checkpoint @ step 7600
Browse files- README.md +1 -1
- k3_2b-latest.pt +3 -0
- metrics.jsonl +11 -0
README.md
CHANGED
|
@@ -9,7 +9,7 @@ tags:
|
|
| 9 |
|
| 10 |
# d
|
| 11 |
|
| 12 |
-
In-training periodic checkpoint (step
|
| 13 |
Kimi K3 mini port (`KimiLinearForCausalLM`).
|
| 14 |
|
| 15 |
**Not a finished model** -- intermediate weights uploaded during training for safekeeping/diffing.
|
|
|
|
| 9 |
|
| 10 |
# d
|
| 11 |
|
| 12 |
+
In-training periodic checkpoint (step 7600). Architecture:
|
| 13 |
Kimi K3 mini port (`KimiLinearForCausalLM`).
|
| 14 |
|
| 15 |
**Not a finished model** -- intermediate weights uploaded during training for safekeeping/diffing.
|
k3_2b-latest.pt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:3b9bbe8fd064c7f19d907188fffcf5a1f7520acd16c62cc9ee37899e57523d3c
|
| 3 |
+
size 10478273275
|
metrics.jsonl
CHANGED
|
@@ -833,3 +833,14 @@
|
|
| 833 |
{"wall": 6740.268, "step": 7490, "loss": 2.152279863754908, "lm_loss": 2.152279863754908, "mtp_loss": 0.0, "lr": 0.025, "grad_norm": 0.3159566819667816, "tokens": 2208890880, "adamw_lr": 0.0004, "mem_alloc_gb": 19.520028591156006, "mem_reserv_gb": 84.498046875, "loss_smoothed": 2.205030154188474, "seq_len": 4096}
|
| 834 |
{"wall": 6947.098, "eval_loss": 1.904066413640976, "eval_ppl": 6.713137626647949, "step": 7500}
|
| 835 |
{"wall": 6947.1, "step": 7500, "loss": 2.268050566315651, "lm_loss": 2.268050566315651, "mtp_loss": 0.0, "lr": 0.025, "grad_norm": 0.31010136008262634, "tokens": 2211840000, "adamw_lr": 0.0004, "mem_alloc_gb": 19.520028591156006, "mem_reserv_gb": 84.498046875, "loss_smoothed": 2.227519405881564, "seq_len": 4096}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 833 |
{"wall": 6740.268, "step": 7490, "loss": 2.152279863754908, "lm_loss": 2.152279863754908, "mtp_loss": 0.0, "lr": 0.025, "grad_norm": 0.3159566819667816, "tokens": 2208890880, "adamw_lr": 0.0004, "mem_alloc_gb": 19.520028591156006, "mem_reserv_gb": 84.498046875, "loss_smoothed": 2.205030154188474, "seq_len": 4096}
|
| 834 |
{"wall": 6947.098, "eval_loss": 1.904066413640976, "eval_ppl": 6.713137626647949, "step": 7500}
|
| 835 |
{"wall": 6947.1, "step": 7500, "loss": 2.268050566315651, "lm_loss": 2.268050566315651, "mtp_loss": 0.0, "lr": 0.025, "grad_norm": 0.31010136008262634, "tokens": 2211840000, "adamw_lr": 0.0004, "mem_alloc_gb": 19.520028591156006, "mem_reserv_gb": 84.498046875, "loss_smoothed": 2.227519405881564, "seq_len": 4096}
|
| 836 |
+
{"wall": 7229.589, "step": 7510, "loss": 2.2065874338150024, "lm_loss": 2.2065874338150024, "mtp_loss": 0.0, "lr": 0.025, "grad_norm": 0.33978474140167236, "tokens": 2214789120, "adamw_lr": 0.0004, "mem_alloc_gb": 19.520028591156006, "mem_reserv_gb": 85.845703125, "loss_smoothed": 2.202607789138953, "seq_len": 4096}
|
| 837 |
+
{"wall": 7434.265, "step": 7520, "loss": 2.280862679084142, "lm_loss": 2.280862679084142, "mtp_loss": 0.0, "lr": 0.025, "grad_norm": 0.2641179859638214, "tokens": 2217738240, "adamw_lr": 0.0004, "mem_alloc_gb": 19.520028591156006, "mem_reserv_gb": 85.845703125, "loss_smoothed": 2.2242303557693957, "seq_len": 4096}
|
| 838 |
+
{"wall": 7638.993, "step": 7530, "loss": 2.0638744135697684, "lm_loss": 2.0638744135697684, "mtp_loss": 0.0, "lr": 0.025, "grad_norm": 0.34064438939094543, "tokens": 2220687360, "adamw_lr": 0.0004, "mem_alloc_gb": 19.520028591156006, "mem_reserv_gb": 85.845703125, "loss_smoothed": 2.1932508826255797, "seq_len": 4096}
|
| 839 |
+
{"wall": 7843.935, "step": 7540, "loss": 2.258356382449468, "lm_loss": 2.258356382449468, "mtp_loss": 0.0, "lr": 0.025, "grad_norm": 0.3244863450527191, "tokens": 2223636480, "adamw_lr": 0.0004, "mem_alloc_gb": 19.520028591156006, "mem_reserv_gb": 85.845703125, "loss_smoothed": 2.1596314653754236, "seq_len": 4096}
|
| 840 |
+
{"wall": 8048.28, "step": 7550, "loss": 2.256014421582222, "lm_loss": 2.256014421582222, "mtp_loss": 0.0, "lr": 0.025, "grad_norm": 0.36427590250968933, "tokens": 2226585600, "adamw_lr": 0.0004, "mem_alloc_gb": 19.520028591156006, "mem_reserv_gb": 85.845703125, "loss_smoothed": 2.220189055800438, "seq_len": 4096}
|
| 841 |
+
{"wall": 8252.945, "step": 7560, "loss": 2.2816530664761863, "lm_loss": 2.2816530664761863, "mtp_loss": 0.0, "lr": 0.025, "grad_norm": 0.3668995499610901, "tokens": 2229534720, "adamw_lr": 0.0004, "mem_alloc_gb": 19.520028591156006, "mem_reserv_gb": 85.845703125, "loss_smoothed": 2.2056768750151, "seq_len": 4096}
|
| 842 |
+
{"wall": 8458.297, "step": 7570, "loss": 2.1709067448973656, "lm_loss": 2.1709067448973656, "mtp_loss": 0.0, "lr": 0.025, "grad_norm": 0.29076918959617615, "tokens": 2232483840, "adamw_lr": 0.0004, "mem_alloc_gb": 19.520028591156006, "mem_reserv_gb": 85.845703125, "loss_smoothed": 2.2029625174899894, "seq_len": 4096}
|
| 843 |
+
{"wall": 8662.757, "step": 7580, "loss": 2.24979467689991, "lm_loss": 2.24979467689991, "mtp_loss": 0.0, "lr": 0.025, "grad_norm": 0.37173184752464294, "tokens": 2235432960, "adamw_lr": 0.0004, "mem_alloc_gb": 19.520028591156006, "mem_reserv_gb": 85.845703125, "loss_smoothed": 2.2057685454686484, "seq_len": 4096}
|
| 844 |
+
{"wall": 8867.914, "step": 7590, "loss": 2.27835022409757, "lm_loss": 2.27835022409757, "mtp_loss": 0.0, "lr": 0.025, "grad_norm": 0.3151431977748871, "tokens": 2238382080, "adamw_lr": 0.0004, "mem_alloc_gb": 19.520028591156006, "mem_reserv_gb": 85.845703125, "loss_smoothed": 2.182744794587294, "seq_len": 4096}
|
| 845 |
+
{"wall": 9075.259, "eval_loss": 1.906115546822548, "eval_ppl": 6.726907730102539, "step": 7600}
|
| 846 |
+
{"wall": 9075.26, "step": 7600, "loss": 2.1286584635575614, "lm_loss": 2.1286584635575614, "mtp_loss": 0.0, "lr": 0.025, "grad_norm": 0.2787507176399231, "tokens": 2241331200, "adamw_lr": 0.0004, "mem_alloc_gb": 19.520028591156006, "mem_reserv_gb": 85.845703125, "loss_smoothed": 2.2174641465147333, "seq_len": 4096}
|