Text Generation
Transformers
Safetensors
complex_kda
complex-kda
linear-attention
kimi-delta-attention
conversational
custom_code
Instructions to use openeurollm/kda-sigmoid-hybrid-1.3B-100B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use openeurollm/kda-sigmoid-hybrid-1.3B-100B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="openeurollm/kda-sigmoid-hybrid-1.3B-100B", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("openeurollm/kda-sigmoid-hybrid-1.3B-100B", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use openeurollm/kda-sigmoid-hybrid-1.3B-100B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "openeurollm/kda-sigmoid-hybrid-1.3B-100B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "openeurollm/kda-sigmoid-hybrid-1.3B-100B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/openeurollm/kda-sigmoid-hybrid-1.3B-100B
- SGLang
How to use openeurollm/kda-sigmoid-hybrid-1.3B-100B 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 "openeurollm/kda-sigmoid-hybrid-1.3B-100B" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "openeurollm/kda-sigmoid-hybrid-1.3B-100B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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 "openeurollm/kda-sigmoid-hybrid-1.3B-100B" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "openeurollm/kda-sigmoid-hybrid-1.3B-100B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use openeurollm/kda-sigmoid-hybrid-1.3B-100B with Docker Model Runner:
docker model run hf.co/openeurollm/kda-sigmoid-hybrid-1.3B-100B
Condense the tokenizer section of the model card
Browse files
README.md
CHANGED
|
@@ -38,35 +38,12 @@ The bundled tokenizer is configured the way the training corpus was encoded:
|
|
| 38 |
repository's own defaults differ on both points, so encode through the
|
| 39 |
tokenizer shipped here rather than re-fetching it by name.
|
| 40 |
|
| 41 |
-
**To condition on the start of a document, prefix the EOS token
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
|---|---|---|
|
| 48 |
-
| none | 2.0104 | 3.2947 |
|
| 49 |
-
| **EOS** | **1.9960** | **2.9606** |
|
| 50 |
-
| BOS | 2.0150 | 3.3768 |
|
| 51 |
-
|
| 52 |
-
So the EOS is worth ~0.33 nats on the opening tokens and the BOS costs ~0.08.
|
| 53 |
-
|
| 54 |
-
**Only at a document start.** The prefix is a "a new document begins here"
|
| 55 |
-
signal, and mid-document it is a false one — on continuations the same EOS
|
| 56 |
-
prefix *costs* 0.34 nats over the first 8 tokens (2.19 → 2.22 overall). Prefix
|
| 57 |
-
it when you mean a fresh document; leave a continuation bare. Nothing in the
|
| 58 |
-
weights or the tokenizer can tell these apart, which is why this is the
|
| 59 |
-
caller's decision.
|
| 60 |
-
|
| 61 |
-
`bos_token` is remapped to `</s>` here, so a pipeline that asks for "the BOS"
|
| 62 |
-
(lm-eval's `--add_bos_token`, a generic wrapper) gets the separator rather than
|
| 63 |
-
the unused `<s>`. `add_bos_token` remains `False`, so the default is still a
|
| 64 |
-
bare prompt — which is the convention every number quoted for these models was
|
| 65 |
-
measured under.
|
| 66 |
-
|
| 67 |
-
If you are coming from `fla-hub` checkpoints, note that they use the opposite
|
| 68 |
-
convention -- trained as `[BOS, text...]` with the BOS as the document
|
| 69 |
-
separator -- so the habit does not carry over.
|
| 70 |
|
| 71 |
## Usage
|
| 72 |
|
|
|
|
| 38 |
repository's own defaults differ on both points, so encode through the
|
| 39 |
tokenizer shipped here rather than re-fetching it by name.
|
| 40 |
|
| 41 |
+
**To condition on the start of a document, prefix the EOS token** -- that is
|
| 42 |
+
what precedes every document's first token in training, and a BOS was never
|
| 43 |
+
seen at any position. Leave a continuation bare: mid-document the prefix is a
|
| 44 |
+
false signal and costs accuracy. `bos_token` is remapped to `</s>` here, so a
|
| 45 |
+
caller that asks for "the BOS" gets the separator, while `add_bos_token` stays
|
| 46 |
+
`False` and the default remains a bare prompt.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 47 |
|
| 48 |
## Usage
|
| 49 |
|