Instructions to use Unseen1980/daedalus-150m-instruct with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Unseen1980/daedalus-150m-instruct with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Unseen1980/daedalus-150m-instruct") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Unseen1980/daedalus-150m-instruct") model = AutoModelForCausalLM.from_pretrained("Unseen1980/daedalus-150m-instruct", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Unseen1980/daedalus-150m-instruct with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Unseen1980/daedalus-150m-instruct" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Unseen1980/daedalus-150m-instruct", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Unseen1980/daedalus-150m-instruct
- SGLang
How to use Unseen1980/daedalus-150m-instruct 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 "Unseen1980/daedalus-150m-instruct" \ --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": "Unseen1980/daedalus-150m-instruct", "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 "Unseen1980/daedalus-150m-instruct" \ --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": "Unseen1980/daedalus-150m-instruct", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use Unseen1980/daedalus-150m-instruct with Docker Model Runner:
docker model run hf.co/Unseen1980/daedalus-150m-instruct
Add link to paper
#1
by nielsr HF Staff - opened
README.md
CHANGED
|
@@ -1,18 +1,18 @@
|
|
| 1 |
---
|
| 2 |
-
|
|
|
|
| 3 |
library_name: transformers
|
|
|
|
| 4 |
pipeline_tag: text-generation
|
| 5 |
-
language:
|
| 6 |
-
- en
|
| 7 |
tags:
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
widget:
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
inference:
|
| 17 |
parameters:
|
| 18 |
max_new_tokens: 96
|
|
@@ -23,6 +23,8 @@ inference:
|
|
| 23 |
|
| 24 |
# Daedalus-150M — Instruct
|
| 25 |
|
|
|
|
|
|
|
| 26 |
A 150M-parameter language model built for **CPU inference**. Full attention is
|
| 27 |
kept in only 6 of its 18 layers; the other 12 use short convolutions whose
|
| 28 |
memory is two timesteps wide however long the conversation gets. Decoding
|
|
@@ -85,4 +87,4 @@ lines. English only, 2048-token context, single seed.
|
|
| 85 |
The 4-bit build costs about 6% perplexity — quantisation-aware training was
|
| 86 |
built but did not run. Roughly 48% of the convolution channels are inert and
|
| 87 |
cannot be pruned, and the 49,152-entry vocabulary is larger than this model size
|
| 88 |
-
warrants. All three are documented in the paper.
|
|
|
|
| 1 |
---
|
| 2 |
+
language:
|
| 3 |
+
- en
|
| 4 |
library_name: transformers
|
| 5 |
+
license: apache-2.0
|
| 6 |
pipeline_tag: text-generation
|
|
|
|
|
|
|
| 7 |
tags:
|
| 8 |
+
- daedalus
|
| 9 |
+
- cpu-inference
|
| 10 |
+
- lfm2
|
| 11 |
+
- hybrid
|
| 12 |
widget:
|
| 13 |
+
- text: What is the capital of France?
|
| 14 |
+
- text: Explain photosynthesis in one sentence.
|
| 15 |
+
- text: What is the difference between a CPU and a GPU?
|
| 16 |
inference:
|
| 17 |
parameters:
|
| 18 |
max_new_tokens: 96
|
|
|
|
| 23 |
|
| 24 |
# Daedalus-150M — Instruct
|
| 25 |
|
| 26 |
+
This model was presented in the paper [Daedalus-150M: A Convolution-Attention Hybrid Designed for CPU Inference](https://huggingface.co/papers/2608.20210).
|
| 27 |
+
|
| 28 |
A 150M-parameter language model built for **CPU inference**. Full attention is
|
| 29 |
kept in only 6 of its 18 layers; the other 12 use short convolutions whose
|
| 30 |
memory is two timesteps wide however long the conversation gets. Decoding
|
|
|
|
| 87 |
The 4-bit build costs about 6% perplexity — quantisation-aware training was
|
| 88 |
built but did not run. Roughly 48% of the convolution channels are inert and
|
| 89 |
cannot be pruned, and the 49,152-entry vocabulary is larger than this model size
|
| 90 |
+
warrants. All three are documented in the paper.
|