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
File size: 2,074 Bytes
06b17c5 6f188c2 06b17c5 6f188c2 06b17c5 6f188c2 06b17c5 6f188c2 06b17c5 6f188c2 06b17c5 6f188c2 06b17c5 6f188c2 06b17c5 | 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 100 101 102 | ---
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.
|