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
Add Lacuna V1 model card
Browse files
README.md
ADDED
|
@@ -0,0 +1,87 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
base_model: ByteDance-Seed/Seed-Coder-8B-Base
|
| 4 |
+
library_name: transformers
|
| 5 |
+
tags:
|
| 6 |
+
- code
|
| 7 |
+
- code-completion
|
| 8 |
+
- code-editing
|
| 9 |
+
- fill-in-the-middle
|
| 10 |
+
- autocomplete
|
| 11 |
+
- lacuna
|
| 12 |
+
---
|
| 13 |
+
|
| 14 |
+
# Lacuna V1
|
| 15 |
+
|
| 16 |
+
Lacuna V1 is an experimental code edit completion model.
|
| 17 |
+
|
| 18 |
+
It predicts replacement code for numbered edit regions inside a Seed-Coder FIM
|
| 19 |
+
prompt. It is a completion model, not a chat model.
|
| 20 |
+
|
| 21 |
+
## Marker Format
|
| 22 |
+
|
| 23 |
+
Markers define the regions to replace.
|
| 24 |
+
|
| 25 |
+
- Region 1: `<|marker_1|>` opens, `<|marker_2|>` closes
|
| 26 |
+
- Region 2: `<|marker_3|>` opens, `<|marker_4|>` closes
|
| 27 |
+
- Additional regions continue with the same numbered pattern
|
| 28 |
+
|
| 29 |
+
The prompt should contain the surrounding code context and marker placeholders.
|
| 30 |
+
The completion starts at the first marker and returns the replacement span with
|
| 31 |
+
markers included.
|
| 32 |
+
|
| 33 |
+
## Typical Input
|
| 34 |
+
|
| 35 |
+
```text
|
| 36 |
+
<[fim-suffix]>
|
| 37 |
+
return total;
|
| 38 |
+
}
|
| 39 |
+
|
| 40 |
+
<[fim-prefix]>
|
| 41 |
+
function sum(items) {
|
| 42 |
+
let total = 0;
|
| 43 |
+
for (const item of items) {
|
| 44 |
+
<|marker_1|><|marker_2|>
|
| 45 |
+
}
|
| 46 |
+
|
| 47 |
+
<[fim-middle]>
|
| 48 |
+
<|marker_1|>
|
| 49 |
+
```
|
| 50 |
+
|
| 51 |
+
## Typical Output
|
| 52 |
+
|
| 53 |
+
```text
|
| 54 |
+
<|marker_1|>
|
| 55 |
+
total += item.value;
|
| 56 |
+
<|marker_2|>
|
| 57 |
+
```
|
| 58 |
+
|
| 59 |
+
For multiple edited regions, the output keeps the same marker order:
|
| 60 |
+
|
| 61 |
+
```text
|
| 62 |
+
<|marker_1|>
|
| 63 |
+
first replacement
|
| 64 |
+
<|marker_2|><|marker_3|>
|
| 65 |
+
second replacement
|
| 66 |
+
<|marker_4|>
|
| 67 |
+
```
|
| 68 |
+
|
| 69 |
+
## Completion Settings
|
| 70 |
+
|
| 71 |
+
```text
|
| 72 |
+
temperature: 0
|
| 73 |
+
top_p: 1
|
| 74 |
+
max_tokens: 256
|
| 75 |
+
```
|
| 76 |
+
|
| 77 |
+
Use a larger `max_tokens` value for longer or multi-region edits.
|
| 78 |
+
|
| 79 |
+
## Limitations
|
| 80 |
+
|
| 81 |
+
Lacuna V1 is experimental. It can produce incorrect code, incomplete
|
| 82 |
+
replacements, or malformed marker spans. Validate output before applying edits
|
| 83 |
+
automatically.
|
| 84 |
+
|
| 85 |
+
## License
|
| 86 |
+
|
| 87 |
+
Apache-2.0.
|