Text Generation
Transformers
Safetensors
English
Portuguese
qwen2
mongodb
code
fim
autocomplete
synthetic-data
conversational
Eval Results (legacy)
text-generation-inference
Instructions to use esilva/KapiCoder-Mongo-Small with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use esilva/KapiCoder-Mongo-Small with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="esilva/KapiCoder-Mongo-Small") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("esilva/KapiCoder-Mongo-Small") model = AutoModelForCausalLM.from_pretrained("esilva/KapiCoder-Mongo-Small", device_map="auto") 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=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use esilva/KapiCoder-Mongo-Small with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "esilva/KapiCoder-Mongo-Small" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "esilva/KapiCoder-Mongo-Small", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/esilva/KapiCoder-Mongo-Small
- SGLang
How to use esilva/KapiCoder-Mongo-Small 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 "esilva/KapiCoder-Mongo-Small" \ --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": "esilva/KapiCoder-Mongo-Small", "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 "esilva/KapiCoder-Mongo-Small" \ --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": "esilva/KapiCoder-Mongo-Small", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use esilva/KapiCoder-Mongo-Small with Docker Model Runner:
docker model run hf.co/esilva/KapiCoder-Mongo-Small
File size: 4,113 Bytes
4ba57bc 2419a3b 4ba57bc 9d9a312 2419a3b 9d9a312 4ba57bc 2419a3b 4ba57bc 2419a3b 4ba57bc 9d9a312 4ba57bc 2419a3b 9d9a312 2419a3b 4ba57bc 2419a3b 4ba57bc 9d9a312 2419a3b 9d9a312 2419a3b 9d9a312 2419a3b 9d9a312 4ba57bc 9d9a312 4ba57bc 2419a3b 4ba57bc | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 | {
"schema": "kapi-hf-model-lock/1",
"model": {
"name": "KapiCoder-Mongo-Small",
"repo_id": "esilva/KapiCoder-Mongo-Small",
"generation": "v4b",
"release_tag": "v0.3.0-preview",
"run": "sft_v4b",
"tier": "T1",
"status": "PREVIEW (public)",
"replaces": {
"generation": "v4",
"release_tag": "v0.2.0-preview",
"note": "the previous release stays reachable by its tag"
}
},
"base_model": {
"repo_id": "Qwen/Qwen2.5-Coder-1.5B",
"revision": "df3ce67c0e24480f20468b6ef2894622d69eb73b",
"model_sha256": "8bcb242c05f271406b3f585b7688f86e350413612ef67bca6c61700b22d05f3b",
"license": "Apache-2.0"
},
"weights": {
"format": "safetensors",
"dtype": "bfloat16",
"combined_sha256": "b199a1e17084b9c32836c7ae76f54914182d2766664663051b7a51779fb92039",
"files_sha256": {
"config.json": "9dd8637a8aaa2eb099a2fbfcc1f3a13c47055b870a850fe807a90f91470165ed",
"generation_config.json": "444ea57ebf361c659d1f5c23508319b691e181d122588ea3cdd5f68d3e618b1f",
"merges.txt": "599bab54075088774b1733fde865d5bd747cbcc7a547c5bc12610e874e26f5e3",
"model.safetensors": "6c176541e4e144f5558bcd0b3fba516baf0e80d5676243c89af821f7eb1eb148",
"tokenizer.json": "c0382117ea329cdf097041132f6d735924b697924d6f6fc3945713e96ce87539",
"tokenizer_config.json": "4a917e4772d9b246ef600e1c5d7d81e3a81ae9f3f2d10d78ccb02c86e5fb184a",
"vocab.json": "ca10d7e9fb3ed18575dd1e277a2579c16d108e32f27439684afa0e10b1440910"
}
},
"training": {
"method": "lora",
"master_dtype": "bf16",
"optimizer": "adamw",
"peak_lr": 0.00015,
"weight_decay": 0.0,
"seed": 20261104,
"lora": {
"r": 64,
"alpha": 128,
"dropout": 0.05,
"targets": [
"q_proj",
"k_proj",
"v_proj",
"o_proj",
"gate_proj",
"up_proj",
"down_proj"
]
},
"trainable_params": 73859072,
"total_steps": 4440,
"steps_per_epoch": 2960,
"tokens_seen": 124537220,
"elapsed_train_h": 20.5,
"started_utc": "2026-11-14T06:56:37Z",
"finished_utc": "2026-11-15T05:04:10Z",
"git_commit": "8d9cb764110ab62d5d1a7be7e8ff6deefe60a9f6",
"git_dirty": true,
"train_config_sha256": "63cd039193cbd9b9758348f81d48bb6388d4b027df3f2418fb94556a942c61f9",
"config_file_sha256": "52618d327e688aab6b93489514c7295bf464d6f1d6596dfcb46197eb875d013f",
"libraries": {
"python": "3.12.10",
"torch": "2.10.0+rocm7.14.0a20260611",
"transformers": "4.57.6",
"peft": "0.17.1",
"tokenizers": "0.22.2",
"safetensors": "0.7.0"
},
"hardware": "AMD Radeon RX 7800 XT",
"single_training_run": true
},
"dataset": {
"name": "student corpus v4b (not published)",
"published": false,
"label_source": null,
"examples": 205238,
"tokens_per_epoch": 82960670,
"replay_examples": 16150,
"replay_token_share": null,
"corpus_manifest_sha256": "6f86e8ce54c703f55e12d48f8343f2f64bd76382e96705fe38b60ebb900ea311",
"ids_sha256": null,
"rows_sha256": null,
"student_corpus_config_sha256": "7eb9259b6de35add81e8775ef5ec8ec2a8c4250a1aaa4cf792dcbe440a3678d6",
"accepted_sha256": null
},
"evaluation": {
"val_v2c": {
"split": "val",
"n": 2000,
"seed": 20261008,
"sample_ids_sha256": "28ba86be496839a321de0035d6a7e21827a5e8de4362151d80958ee8c798562f",
"dataset_sha256": "af3331481966f3ebfb05d36109b43014cd850f669f6f5d2a524f8da6e9609ec7",
"manifest_sha256": "2fef4f342d8a21eaf6d7e9eb1f223b3c8094d56c8dcd00e64f04bc20b20cd3cb"
},
"homologation_v1": {
"set_sha256": "aca0aae51533a95d830c1f296d621f9203a7d76475658fb1e2dcc8f389495332",
"n": 6030,
"items_published": false
},
"contract": {
"name": "editor-context-v2",
"golden_sha256": null,
"note": "editor-context-v1 header plus a TARGET FIELDS line; inner-closer post-processing (see README)"
}
},
"publish_tooling": {
"scripts_publish_sha256": "30e5e45a89bed43585ec2c266b8636e3c86f27c6aa267e30a3fd930faa66409c"
}
}
|