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-Nano with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use esilva/KapiCoder-Mongo-Nano with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="esilva/KapiCoder-Mongo-Nano") 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-Nano") model = AutoModelForCausalLM.from_pretrained("esilva/KapiCoder-Mongo-Nano", 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-Nano with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "esilva/KapiCoder-Mongo-Nano" # 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-Nano", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/esilva/KapiCoder-Mongo-Nano
- SGLang
How to use esilva/KapiCoder-Mongo-Nano 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-Nano" \ --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-Nano", "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-Nano" \ --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-Nano", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use esilva/KapiCoder-Mongo-Nano with Docker Model Runner:
docker model run hf.co/esilva/KapiCoder-Mongo-Nano
File size: 3,960 Bytes
c03bfe1 | 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 | {
"schema": "kapi-hf-model-lock/1",
"model": {
"name": "KapiCoder-Mongo-Nano",
"repo_id": "esilva/KapiCoder-Mongo-Nano",
"generation": "v3",
"release_tag": "v0.1.0-preview",
"run": "sft_v3",
"tier": "T0",
"status": "PREVIEW (private)"
},
"base_model": {
"repo_id": "Qwen/Qwen2.5-Coder-0.5B",
"revision": "8123ea2e9354afb7ffcc6c8641d1b2f5ecf18301",
"model_sha256": "96217dc3a23c02904459bcfb1dcad72fda4ca5e629182cca700f558803fecbc5",
"license": "Apache-2.0"
},
"weights": {
"format": "safetensors",
"dtype": "bfloat16",
"combined_sha256": "029aab78dde4ee60c0c1a6cb0e5a055b6a81b79ac8224fe64f117a2e04f27e2c",
"files_sha256": {
"config.json": "1a0023f5853290cf4b94ddb544ef778e8ecf7861f2d3e79e75f90e064863ed9c",
"generation_config.json": "215d4506cf90f3590fe821bee47dc92e99caa06f2c1b36076693b5209980009c",
"merges.txt": "599bab54075088774b1733fde865d5bd747cbcc7a547c5bc12610e874e26f5e3",
"model.safetensors": "6ff7b2528689b448ad8d06e0451ffae4f70f803bd32dc0ab8552f4a70c230e31",
"tokenizer.json": "c0382117ea329cdf097041132f6d735924b697924d6f6fc3945713e96ce87539",
"tokenizer_config.json": "283ec39d07ebfd1904aa2dee3c7d73524ed96c489fdb3915629900d3ab3ac319",
"vocab.json": "ca10d7e9fb3ed18575dd1e277a2579c16d108e32f27439684afa0e10b1440910"
}
},
"training": {
"method": "full",
"master_dtype": "fp32",
"optimizer": "adamw",
"peak_lr": 2e-05,
"weight_decay": 0.01,
"seed": 20261018,
"lora": null,
"trainable_params": 494032768,
"total_steps": 4704,
"steps_per_epoch": 2352,
"tokens_seen": 129999692,
"elapsed_train_h": 4.381,
"started_utc": "2026-10-25T01:59:41Z",
"finished_utc": "2026-10-25T06:23:50Z",
"git_commit": "ba1b880645d86bb33483c016a34782576e901ba9",
"git_dirty": false,
"train_config_sha256": "8e7ef77567ecdc561c17e6520d952df91bdaa3b33a26964a0979641d09ce68f8",
"config_file_sha256": "54fc8718fb07857ded4cf8937c6b785ef4599545cb001924d8cb67cc41b7ecdc",
"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 v3 (not published)",
"published": false,
"label_source": "mixed: teacher_seq (accepted fim_ctx/completion) | gold (llm, grammar, fim_raw) | replay",
"examples": 238453,
"tokens_per_epoch": 64999846,
"replay_examples": 12618,
"replay_token_share": 0.12,
"corpus_manifest_sha256": "98abe23cb2b562cb96ee4f0730550f452f08843c2ba6c084a216f347365c2d1d",
"ids_sha256": "434f2e2cbe01b80bf9eae45747d91a2660cc152dcbad33f444bef8ea33367cf1",
"rows_sha256": "87bcb71bfa0dc4aa6e8e40ab101dd3d5af7ee1ddfbad629bd9180dbc203e1f46",
"student_corpus_config_sha256": "47f02a0b6a2a1564d520c4137715de95932835d143003eb7204b01201f2189fb",
"accepted_sha256": "2a32311843d3479cfd6ac6210555208bc53d01c19b23887f00a6ab37c1ba97bc"
},
"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-v1",
"golden_sha256": "06ef5347b128d4dcd11e838ebaa45b30797c5ba30e67222276477e9921ae51c3"
}
},
"publish_tooling": {
"scripts_publish_sha256": "c31297cc42c0b967e55d196d2e88b48a073d6dc988cd1d097313faafc6b0d45b"
}
}
|