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>&lt;&#124;marker_1&#124;&gt;</code> | <code>&lt;&#124;marker_2&#124;&gt;</code> |
| 2 | <code>&lt;&#124;marker_3&#124;&gt;</code> | <code>&lt;&#124;marker_4&#124;&gt;</code> |
| N | <code>&lt;&#124;marker_2N-1&#124;&gt;</code> | <code>&lt;&#124;marker_2N&#124;&gt;</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.