Text Generation
Transformers
Safetensors
Spanish
English
llama
milox
from-scratch
conversational
text-generation-inference
Instructions to use blackdaqlabs/MiloX1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use blackdaqlabs/MiloX1 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="blackdaqlabs/MiloX1") 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("blackdaqlabs/MiloX1") model = AutoModelForCausalLM.from_pretrained("blackdaqlabs/MiloX1", 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 blackdaqlabs/MiloX1 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "blackdaqlabs/MiloX1" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "blackdaqlabs/MiloX1", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/blackdaqlabs/MiloX1
- SGLang
How to use blackdaqlabs/MiloX1 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 "blackdaqlabs/MiloX1" \ --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": "blackdaqlabs/MiloX1", "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 "blackdaqlabs/MiloX1" \ --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": "blackdaqlabs/MiloX1", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use blackdaqlabs/MiloX1 with Docker Model Runner:
docker model run hf.co/blackdaqlabs/MiloX1
Upload 5 files
Browse files- README.md +3 -0
- config.json +37 -0
- model.safetensors +3 -0
- tokenizer.json +0 -0
README.md
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Milo X1 (dpo)
|
| 2 |
+
|
| 3 |
+
Transformer en español entrenado desde cero. ~12.3M parámetros, GQA + RoPE + QK-Norm + SwiGLU + RMSNorm. Cargar con `milo_core.load_model`. Plantilla de chat con tokens especiales (`<|user|>`, `<|assistant|>`, `<|end|>`).
|
config.json
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"vocab_size": 16384,
|
| 3 |
+
"d_model": 320,
|
| 4 |
+
"n_layers": 6,
|
| 5 |
+
"n_heads": 5,
|
| 6 |
+
"n_kv_heads": 1,
|
| 7 |
+
"d_ff": 960,
|
| 8 |
+
"context_length": 768,
|
| 9 |
+
"dropout": 0.0,
|
| 10 |
+
"rope_theta": 100000.0,
|
| 11 |
+
"qk_norm": true,
|
| 12 |
+
"logit_softcap": 30.0,
|
| 13 |
+
"z_loss": 0.0001,
|
| 14 |
+
"tie_embeddings": true,
|
| 15 |
+
"architecture": "MiloX1",
|
| 16 |
+
"stage": "dpo",
|
| 17 |
+
"special_tokens": [
|
| 18 |
+
"<PAD>",
|
| 19 |
+
"<UNK>",
|
| 20 |
+
"<BOS>",
|
| 21 |
+
"<EOS>",
|
| 22 |
+
"<|system|>",
|
| 23 |
+
"<|user|>",
|
| 24 |
+
"<|assistant|>",
|
| 25 |
+
"<|end|>",
|
| 26 |
+
"<|reserved_0|>",
|
| 27 |
+
"<|reserved_1|>",
|
| 28 |
+
"<|reserved_2|>",
|
| 29 |
+
"<|reserved_3|>",
|
| 30 |
+
"<|reserved_4|>",
|
| 31 |
+
"<|reserved_5|>",
|
| 32 |
+
"<|reserved_6|>",
|
| 33 |
+
"<|reserved_7|>"
|
| 34 |
+
],
|
| 35 |
+
"chat_template": "<BOS>[<|system|>S<|end|>]<|user|>U<|end|><|assistant|>A<|end|>",
|
| 36 |
+
"core_version": "4.0"
|
| 37 |
+
}
|
model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:c5a8585dbbc84fd5c63910330f9990240707f529a39dd5e87cc55703e68a72ed
|
| 3 |
+
size 49013720
|
tokenizer.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|