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
Delete config.json
Browse files- config.json +0 -34
config.json
DELETED
|
@@ -1,34 +0,0 @@
|
|
| 1 |
-
{
|
| 2 |
-
"vocab_size": 20032,
|
| 3 |
-
"d_model": 384,
|
| 4 |
-
"n_layers": 8,
|
| 5 |
-
"n_heads": 8,
|
| 6 |
-
"d_ff": 1536,
|
| 7 |
-
"context_length": 768,
|
| 8 |
-
"dropout": 0.1,
|
| 9 |
-
"rope_theta": 10000.0,
|
| 10 |
-
"qk_norm": true,
|
| 11 |
-
"final_logit_softcap": 30.0,
|
| 12 |
-
"label_smoothing": 0.0,
|
| 13 |
-
"architecture": "MiloX1",
|
| 14 |
-
"variant": "fine-tuned",
|
| 15 |
-
"tokenizer_info": {
|
| 16 |
-
"type": "bpe-byte-level",
|
| 17 |
-
"vocab_size": 20032,
|
| 18 |
-
"normalizer": "NFC+Replace",
|
| 19 |
-
"special_tokens": [
|
| 20 |
-
"<PAD>",
|
| 21 |
-
"<UNK>",
|
| 22 |
-
"<BOS>",
|
| 23 |
-
"<EOS>",
|
| 24 |
-
"<|reserved_0|>",
|
| 25 |
-
"<|reserved_1|>",
|
| 26 |
-
"<|reserved_2|>",
|
| 27 |
-
"<|reserved_3|>",
|
| 28 |
-
"<|reserved_4|>",
|
| 29 |
-
"<|reserved_5|>",
|
| 30 |
-
"<|reserved_6|>",
|
| 31 |
-
"<|reserved_7|>"
|
| 32 |
-
]
|
| 33 |
-
}
|
| 34 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|