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
Download provenance/model_lock.json from esilva/KapiCoder-Mongo-Small: direct link, hf CLI and curl.
- Browser
- Download file 4.18 kB
-
https://huggingface.co/esilva/KapiCoder-Mongo-Small/resolve/main/provenance/model_lock.json
- Command line
-
hf download hf://esilva/KapiCoder-Mongo-Small/provenance/model_lock.json
-
curl -L -o model_lock.json https://huggingface.co/esilva/KapiCoder-Mongo-Small/resolve/main/provenance/model_lock.json
4.18 kB
| { | |
| "schema": "kapi-hf-model-lock/1", | |
| "model": { | |
| "name": "KapiCoder-Mongo-Small", | |
| "repo_id": "esilva/KapiCoder-Mongo-Small", | |
| "generation": "v3", | |
| "release_tag": "v0.1.0-preview", | |
| "run": "sft_v3", | |
| "tier": "T1", | |
| "status": "PREVIEW (private)" | |
| }, | |
| "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": "bec5799388cae64e11a1a44a00e253c60743d98d604a21aa2baf2fe122832495", | |
| "files_sha256": { | |
| "config.json": "9dd8637a8aaa2eb099a2fbfcc1f3a13c47055b870a850fe807a90f91470165ed", | |
| "generation_config.json": "444ea57ebf361c659d1f5c23508319b691e181d122588ea3cdd5f68d3e618b1f", | |
| "merges.txt": "599bab54075088774b1733fde865d5bd747cbcc7a547c5bc12610e874e26f5e3", | |
| "model.safetensors": "93a774dbc3335d85fefc9c11cf595f2a89d80c11177d11f3c85674744ab48108", | |
| "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": 20261018, | |
| "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": 4617, | |
| "steps_per_epoch": 3078, | |
| "tokens_seen": 129085790, | |
| "elapsed_train_h": 15.63, | |
| "started_utc": "2026-10-25T12:48:11Z", | |
| "finished_utc": "2026-10-26T04:30:08Z", | |
| "git_commit": "475159056fd7565f9fac63020ec317e93e1e5b01", | |
| "git_dirty": false, | |
| "train_config_sha256": "a45263bbffad55a050a5e8a4a59d361390b7dfb127d86aa07f52bc459d140a1a", | |
| "config_file_sha256": "20a67dc5334c753dc161cfbade0b8fb6eddf7bc57ff252855981e4731c39847c", | |
| "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": 309571, | |
| "tokens_per_epoch": 86000018, | |
| "replay_examples": 16759, | |
| "replay_token_share": 0.12, | |
| "corpus_manifest_sha256": "28ca2cb86c2526db8d5f03dd41c4366c1de98bf54e4f9d5f7b890e7c554589c0", | |
| "ids_sha256": "22fb98ef1294f5f9e88b0d737074c845afdcb44c771c1683e147c86e2e45b181", | |
| "rows_sha256": "d9cf6a3ca5a632632e57bc7e03f80dd71b73af71ac171185b985418ba54fd647", | |
| "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" | |
| } | |
| } | |