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 NOTICE.md from esilva/KapiCoder-Mongo-Small: direct link, hf CLI and curl.
- Browser
- Download file 2.14 kB
-
https://huggingface.co/esilva/KapiCoder-Mongo-Small/resolve/main/NOTICE.md
- Command line
-
hf download hf://esilva/KapiCoder-Mongo-Small/NOTICE.md
-
curl -L -o NOTICE.md https://huggingface.co/esilva/KapiCoder-Mongo-Small/resolve/main/NOTICE.md
NOTICE
KapiCoder-Mongo-Small (version v3, tag v0.1.0-preview) is a derivative work of Qwen/Qwen2.5-Coder-1.5B (revision df3ce67c0e24480f20468b6ef2894622d69eb73b),
licensed under the Apache License, Version 2.0 (see LICENSE).
Modifications: LoRA fine-tuning (r=64) merged into the bf16 weights for MongoDB fill-in-the-middle autocomplete in the editor-context-v1 format. Training data: synthetic MongoDB examples whose labels come partly from a 7B teacher
(KapiTeacher-Mongo-7B, derived from Qwen2.5-Coder-7B) validated by read-only execution, partly from queries written by Qwen3-14B (Apache-2.0) and from a grammar, each with the reference as label;
a share of generic JavaScript/TypeScript replay text. Export to safetensors bf16.
Weights are published in safetensors bf16 only; ONNX builds, if any, are published in a separate repository.
This model is not a product of Alibaba Cloud or the Qwen team and is not endorsed by them. "Qwen" is a name of its owners.
The teacher used to produce part of the training labels is not part of this repository, and neither is the training data.
The training data are synthetic (fictitious schemas); a small share of generic JavaScript/TypeScript replay text comes from npm packages under
MIT, Apache-2.0, BSD and ISC licenses, listed in REPLAY_ATTRIBUTION.md; that code is not redistributed.
AVISO (pt-BR)
KapiCoder-Mongo-Small (versão v3, tag v0.1.0-preview) é um trabalho derivado e modificado de Qwen/Qwen2.5-Coder-1.5B (revisão df3ce67c0e24480f20468b6ef2894622d69eb73b), licenciado sob a Apache License 2.0 (veja LICENSE).
Modificações: ajuste fino LoRA (r=64) mesclado nos pesos bf16 para autocomplete FIM de MongoDB no formato editor-context-v1, com rótulos em parte de um professor de 7B validados por execução somente leitura, em parte de consultas escritas pelo Qwen3-14B (Apache-2.0) e de uma gramática, mais texto de replay de JavaScript/TypeScript; exportação para safetensors bf16.
Não é um produto da Alibaba Cloud nem da equipe Qwen e não tem endosso deles. O professor e os dados de treino não fazem parte deste repositório.