Text Generation
Transformers
Safetensors
qwen3
RAG
function-calling
structured-generation
enterprise
italian
conversational
text-generation-inference
Instructions to use and-emili/aera-4b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use and-emili/aera-4b with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="and-emili/aera-4b") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForMultimodalLM tokenizer = AutoTokenizer.from_pretrained("and-emili/aera-4b") model = AutoModelForMultimodalLM.from_pretrained("and-emili/aera-4b") 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=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Inference
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use and-emili/aera-4b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "and-emili/aera-4b" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "and-emili/aera-4b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/and-emili/aera-4b
- SGLang
How to use and-emili/aera-4b 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 "and-emili/aera-4b" \ --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": "and-emili/aera-4b", "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 "and-emili/aera-4b" \ --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": "and-emili/aera-4b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use and-emili/aera-4b with Docker Model Runner:
docker model run hf.co/and-emili/aera-4b
Update model weights - keeping existing tokenizer_config.json
Browse files- config.json +40 -2
- generation_config.json +3 -3
- model-00001-of-00002.safetensors +1 -1
- model-00002-of-00002.safetensors +1 -1
config.json
CHANGED
|
@@ -10,7 +10,45 @@
|
|
| 10 |
"hidden_size": 2560,
|
| 11 |
"initializer_range": 0.02,
|
| 12 |
"intermediate_size": 9728,
|
| 13 |
-
"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 14 |
"max_window_layers": 36,
|
| 15 |
"model_type": "qwen3",
|
| 16 |
"num_attention_heads": 32,
|
|
@@ -19,7 +57,7 @@
|
|
| 19 |
"pad_token_id": 151654,
|
| 20 |
"rms_norm_eps": 1e-06,
|
| 21 |
"rope_scaling": null,
|
| 22 |
-
"rope_theta":
|
| 23 |
"sliding_window": null,
|
| 24 |
"tie_word_embeddings": true,
|
| 25 |
"torch_dtype": "bfloat16",
|
|
|
|
| 10 |
"hidden_size": 2560,
|
| 11 |
"initializer_range": 0.02,
|
| 12 |
"intermediate_size": 9728,
|
| 13 |
+
"layer_types": [
|
| 14 |
+
"full_attention",
|
| 15 |
+
"full_attention",
|
| 16 |
+
"full_attention",
|
| 17 |
+
"full_attention",
|
| 18 |
+
"full_attention",
|
| 19 |
+
"full_attention",
|
| 20 |
+
"full_attention",
|
| 21 |
+
"full_attention",
|
| 22 |
+
"full_attention",
|
| 23 |
+
"full_attention",
|
| 24 |
+
"full_attention",
|
| 25 |
+
"full_attention",
|
| 26 |
+
"full_attention",
|
| 27 |
+
"full_attention",
|
| 28 |
+
"full_attention",
|
| 29 |
+
"full_attention",
|
| 30 |
+
"full_attention",
|
| 31 |
+
"full_attention",
|
| 32 |
+
"full_attention",
|
| 33 |
+
"full_attention",
|
| 34 |
+
"full_attention",
|
| 35 |
+
"full_attention",
|
| 36 |
+
"full_attention",
|
| 37 |
+
"full_attention",
|
| 38 |
+
"full_attention",
|
| 39 |
+
"full_attention",
|
| 40 |
+
"full_attention",
|
| 41 |
+
"full_attention",
|
| 42 |
+
"full_attention",
|
| 43 |
+
"full_attention",
|
| 44 |
+
"full_attention",
|
| 45 |
+
"full_attention",
|
| 46 |
+
"full_attention",
|
| 47 |
+
"full_attention",
|
| 48 |
+
"full_attention",
|
| 49 |
+
"full_attention"
|
| 50 |
+
],
|
| 51 |
+
"max_position_embeddings": 262144,
|
| 52 |
"max_window_layers": 36,
|
| 53 |
"model_type": "qwen3",
|
| 54 |
"num_attention_heads": 32,
|
|
|
|
| 57 |
"pad_token_id": 151654,
|
| 58 |
"rms_norm_eps": 1e-06,
|
| 59 |
"rope_scaling": null,
|
| 60 |
+
"rope_theta": 5000000,
|
| 61 |
"sliding_window": null,
|
| 62 |
"tie_word_embeddings": true,
|
| 63 |
"torch_dtype": "bfloat16",
|
generation_config.json
CHANGED
|
@@ -5,10 +5,10 @@
|
|
| 5 |
151645,
|
| 6 |
151643
|
| 7 |
],
|
| 8 |
-
"max_length":
|
| 9 |
"pad_token_id": 151654,
|
| 10 |
-
"temperature": 0.
|
| 11 |
"top_k": 20,
|
| 12 |
-
"top_p": 0.
|
| 13 |
"transformers_version": "4.51.0"
|
| 14 |
}
|
|
|
|
| 5 |
151645,
|
| 6 |
151643
|
| 7 |
],
|
| 8 |
+
"max_length": 262144,
|
| 9 |
"pad_token_id": 151654,
|
| 10 |
+
"temperature": 0.7,
|
| 11 |
"top_k": 20,
|
| 12 |
+
"top_p": 0.8,
|
| 13 |
"transformers_version": "4.51.0"
|
| 14 |
}
|
model-00001-of-00002.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 4967214624
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:8f65530a5b1a76463aaf49bc5e920c98cded647e26613161d8d5393c985cdd72
|
| 3 |
size 4967214624
|
model-00002-of-00002.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 3077767360
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:0b7212fba7cb864d59c9aa22670a2cd20f70ded1a756cc17b4379cfa424c04bf
|
| 3 |
size 3077767360
|