Text Generation
Transformers
Safetensors
llama
code
code-completion
code-editing
fill-in-the-middle
autocomplete
lacuna
text-generation-inference
Instructions to use jolovicdev/Lacuna-V1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use jolovicdev/Lacuna-V1 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="jolovicdev/Lacuna-V1")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("jolovicdev/Lacuna-V1") model = AutoModelForCausalLM.from_pretrained("jolovicdev/Lacuna-V1") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use jolovicdev/Lacuna-V1 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "jolovicdev/Lacuna-V1" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "jolovicdev/Lacuna-V1", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/jolovicdev/Lacuna-V1
- SGLang
How to use jolovicdev/Lacuna-V1 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 "jolovicdev/Lacuna-V1" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "jolovicdev/Lacuna-V1", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'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 "jolovicdev/Lacuna-V1" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "jolovicdev/Lacuna-V1", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use jolovicdev/Lacuna-V1 with Docker Model Runner:
docker model run hf.co/jolovicdev/Lacuna-V1
| license: apache-2.0 | |
| base_model: ByteDance-Seed/Seed-Coder-8B-Base | |
| library_name: transformers | |
| tags: | |
| - code | |
| - code-completion | |
| - code-editing | |
| - fill-in-the-middle | |
| - autocomplete | |
| - lacuna | |
| # Lacuna V1 | |
| > Experimental code edit completion model for numbered marker spans inside | |
| > Seed-Coder FIM prompts. | |
| Lacuna V1 predicts replacement code for marked edit regions. It is a completion | |
| model, not a chat model. | |
| ## At A Glance | |
| | Field | Value | | |
| | --- | --- | | |
| | Type | Completion model | | |
| | Task | Code edit completion | | |
| | Prompt style | Seed-Coder FIM + numbered markers | | |
| | License | Apache-2.0 | | |
| ## Marker Contract | |
| Markers define the regions to replace. | |
| | Region | Open marker | Close marker | | |
| | ---: | --- | --- | | |
| | 1 | <code><|marker_1|></code> | <code><|marker_2|></code> | | |
| | 2 | <code><|marker_3|></code> | <code><|marker_4|></code> | | |
| | N | <code><|marker_2N-1|></code> | <code><|marker_2N|></code> | | |
| The prompt contains the surrounding code context and marker placeholders. The | |
| completion starts at the first marker and returns the replacement span with | |
| markers included. | |
| ## Typical Input | |
| ```text | |
| <[fim-suffix]> | |
| return total; | |
| } | |
| <[fim-prefix]> | |
| function sum(items) { | |
| let total = 0; | |
| for (const item of items) { | |
| <|marker_1|><|marker_2|> | |
| } | |
| <[fim-middle]> | |
| <|marker_1|> | |
| ``` | |
| ## Typical Output | |
| ```text | |
| <|marker_1|> | |
| total += item.value; | |
| <|marker_2|> | |
| ``` | |
| ### Multiple Regions | |
| For multiple edited regions, the output keeps the same marker order: | |
| ```text | |
| <|marker_1|> | |
| first replacement | |
| <|marker_2|><|marker_3|> | |
| second replacement | |
| <|marker_4|> | |
| ``` | |
| ## Completion Settings | |
| | Setting | Value | | |
| | --- | --- | | |
| | `temperature` | `0` | | |
| | `top_p` | `1` | | |
| | `max_tokens` | `256` | | |
| Use a larger `max_tokens` value for longer or multi-region edits. | |
| ## Limitations | |
| Lacuna V1 is experimental. It can produce incorrect code, incomplete | |
| replacements, or malformed marker spans. Validate output before applying edits | |
| automatically. | |
| ## License | |
| Apache-2.0. | |