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
Polish Lacuna V1 model card
Browse files
README.md
CHANGED
|
@@ -13,21 +13,33 @@ tags:
|
|
| 13 |
|
| 14 |
# Lacuna V1
|
| 15 |
|
| 16 |
-
|
|
|
|
| 17 |
|
| 18 |
-
|
| 19 |
-
|
| 20 |
|
| 21 |
-
##
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 22 |
|
| 23 |
Markers define the regions to replace.
|
| 24 |
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
|
|
|
|
|
|
| 28 |
|
| 29 |
-
The prompt
|
| 30 |
-
|
| 31 |
markers included.
|
| 32 |
|
| 33 |
## Typical Input
|
|
@@ -56,6 +68,8 @@ total += item.value;
|
|
| 56 |
<|marker_2|>
|
| 57 |
```
|
| 58 |
|
|
|
|
|
|
|
| 59 |
For multiple edited regions, the output keeps the same marker order:
|
| 60 |
|
| 61 |
```text
|
|
@@ -68,11 +82,11 @@ second replacement
|
|
| 68 |
|
| 69 |
## Completion Settings
|
| 70 |
|
| 71 |
-
|
| 72 |
-
|
| 73 |
-
|
| 74 |
-
|
| 75 |
-
```
|
| 76 |
|
| 77 |
Use a larger `max_tokens` value for longer or multi-region edits.
|
| 78 |
|
|
|
|
| 13 |
|
| 14 |
# Lacuna V1
|
| 15 |
|
| 16 |
+
> Experimental code edit completion model for numbered marker spans inside
|
| 17 |
+
> Seed-Coder FIM prompts.
|
| 18 |
|
| 19 |
+
Lacuna V1 predicts replacement code for marked edit regions. It is a completion
|
| 20 |
+
model, not a chat model.
|
| 21 |
|
| 22 |
+
## At A Glance
|
| 23 |
+
|
| 24 |
+
| Field | Value |
|
| 25 |
+
| --- | --- |
|
| 26 |
+
| Type | Completion model |
|
| 27 |
+
| Task | Code edit completion |
|
| 28 |
+
| Prompt style | Seed-Coder FIM + numbered markers |
|
| 29 |
+
| License | Apache-2.0 |
|
| 30 |
+
|
| 31 |
+
## Marker Contract
|
| 32 |
|
| 33 |
Markers define the regions to replace.
|
| 34 |
|
| 35 |
+
| Region | Open marker | Close marker |
|
| 36 |
+
| ---: | --- | --- |
|
| 37 |
+
| 1 | <code><|marker_1|></code> | <code><|marker_2|></code> |
|
| 38 |
+
| 2 | <code><|marker_3|></code> | <code><|marker_4|></code> |
|
| 39 |
+
| N | <code><|marker_2N-1|></code> | <code><|marker_2N|></code> |
|
| 40 |
|
| 41 |
+
The prompt contains the surrounding code context and marker placeholders. The
|
| 42 |
+
completion starts at the first marker and returns the replacement span with
|
| 43 |
markers included.
|
| 44 |
|
| 45 |
## Typical Input
|
|
|
|
| 68 |
<|marker_2|>
|
| 69 |
```
|
| 70 |
|
| 71 |
+
### Multiple Regions
|
| 72 |
+
|
| 73 |
For multiple edited regions, the output keeps the same marker order:
|
| 74 |
|
| 75 |
```text
|
|
|
|
| 82 |
|
| 83 |
## Completion Settings
|
| 84 |
|
| 85 |
+
| Setting | Value |
|
| 86 |
+
| --- | --- |
|
| 87 |
+
| `temperature` | `0` |
|
| 88 |
+
| `top_p` | `1` |
|
| 89 |
+
| `max_tokens` | `256` |
|
| 90 |
|
| 91 |
Use a larger `max_tokens` value for longer or multi-region edits.
|
| 92 |
|