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
|
Download NOTICE.md from esilva/KapiCoder-Mongo-Nano: direct link, hf CLI and curl.
- Browser
- Download file 2.09 kB
-
https://huggingface.co/esilva/KapiCoder-Mongo-Nano/resolve/main/NOTICE.md
- Command line
-
hf download hf://esilva/KapiCoder-Mongo-Nano/NOTICE.md
-
curl -L -o NOTICE.md https://huggingface.co/esilva/KapiCoder-Mongo-Nano/resolve/main/NOTICE.md
2.09 kB
| # NOTICE | |
| KapiCoder-Mongo-Nano (version v3, tag `v0.1.0-preview`) is a derivative work of `Qwen/Qwen2.5-Coder-0.5B` (revision `8123ea2e9354afb7ffcc6c8641d1b2f5ecf18301`), | |
| licensed under the Apache License, Version 2.0 (see `LICENSE`). | |
| **Modifications:** full fine-tuning (SFT) 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-Nano (versão v3, tag `v0.1.0-preview`) é um trabalho derivado e **modificado** de `Qwen/Qwen2.5-Coder-0.5B` (revisão `8123ea2e9354afb7ffcc6c8641d1b2f5ecf18301`), licenciado sob a Apache License 2.0 (veja `LICENSE`). | |
| Modificações: ajuste fino completo (SFT) 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. | |