Text Generation
Transformers
Safetensors
Korean
English
aether_micro
Mixture of Experts
mixture-of-experts
custom
aether
latent-thought
multi-token-prediction
custom_code
Instructions to use Be2Jay/AETHER-Micro-0.5B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Be2Jay/AETHER-Micro-0.5B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Be2Jay/AETHER-Micro-0.5B", trust_remote_code=True)# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("Be2Jay/AETHER-Micro-0.5B", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Be2Jay/AETHER-Micro-0.5B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Be2Jay/AETHER-Micro-0.5B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Be2Jay/AETHER-Micro-0.5B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Be2Jay/AETHER-Micro-0.5B
- SGLang
How to use Be2Jay/AETHER-Micro-0.5B 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 "Be2Jay/AETHER-Micro-0.5B" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Be2Jay/AETHER-Micro-0.5B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'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 "Be2Jay/AETHER-Micro-0.5B" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Be2Jay/AETHER-Micro-0.5B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Be2Jay/AETHER-Micro-0.5B with Docker Model Runner:
docker model run hf.co/Be2Jay/AETHER-Micro-0.5B
| #!/usr/bin/env python3 | |
| """ | |
| AETHER-Micro Decoder Layer | |
| Transformer Decoder Layer: Attention + MoE | |
| """ | |
| import torch | |
| import torch.nn as nn | |
| from .configuration_aether_micro import AETHERMicroConfig | |
| from .normalization import AETHERMicroRMSNorm | |
| from .attention import AETHERMicroAttention | |
| from .moe import AETHERMicroMoE | |
| from .latent_thought import AETHERMicroLatentThought | |
| from .self_evaluation import AETHERMicroSelfEvalHead | |
| class AETHERMicroDecoderLayer(nn.Module): | |
| """ | |
| Transformer Decoder Layer | |
| Structure: | |
| 1. Input LayerNorm | |
| 2. Self-Attention (RoPE + GQA) | |
| 3. Post-Attention LayerNorm | |
| 4. MoE FFN (Heterogeneous experts) | |
| 5. Residual connections | |
| """ | |
| def __init__(self, config: AETHERMicroConfig): | |
| super().__init__() | |
| self.hidden_size = config.hidden_size | |
| # Self-Attention | |
| self.input_layernorm = AETHERMicroRMSNorm(config.hidden_size, eps=config.rms_norm_eps) | |
| self.self_attn = AETHERMicroAttention(config) | |
| # Latent Thought Loop (Block 1) | |
| if config.enable_latent_thought: | |
| self.latent_thought = AETHERMicroLatentThought(config) | |
| # Self Evaluation (Block 4) | |
| if config.enable_self_eval: | |
| self.self_evaluation = AETHERMicroSelfEvalHead(config) | |
| # MoE FFN | |
| self.post_attention_layernorm = AETHERMicroRMSNorm(config.hidden_size, eps=config.rms_norm_eps) | |
| self.mlp = AETHERMicroMoE(config) | |
| def forward( | |
| self, | |
| hidden_states: torch.Tensor, | |
| attention_mask: torch.Tensor = None, | |
| position_ids: torch.LongTensor = None, | |
| disable_ltl: bool = False, | |
| ) -> torch.Tensor: | |
| """ | |
| Args: | |
| hidden_states: (batch_size, seq_length, hidden_size) | |
| attention_mask: (batch_size, 1, seq_length, seq_length) | |
| position_ids: (batch_size, seq_length) | |
| Returns: | |
| hidden_states: (batch_size, seq_length, hidden_size) | |
| """ | |
| residual = hidden_states | |
| # Self-Attention | |
| hidden_states = self.input_layernorm(hidden_states) | |
| hidden_states = self.self_attn( | |
| hidden_states=hidden_states, | |
| attention_mask=attention_mask, | |
| position_ids=position_ids, | |
| ) | |
| hidden_states = residual + hidden_states | |
| # Latent Thought Loop (Block 1) - Checkpoint-safe | |
| if hasattr(self, 'latent_thought') and not disable_ltl: | |
| result = self.latent_thought(hidden_states) | |
| # Tuple unpacking (gradient checkpointing 호환) | |
| if isinstance(result, tuple): | |
| hidden_states = result[0] | |
| # metrics는 체크포인팅 모드에서는 무시됨 | |
| else: | |
| hidden_states = result | |
| # MoE FFN | |
| residual = hidden_states | |
| hidden_states = self.post_attention_layernorm(hidden_states) | |
| hidden_states = self.mlp(hidden_states) | |
| hidden_states = residual + hidden_states | |
| # Self Evaluation (Block 4) | |
| # NOTE: self_evaluation returns (quality, overall) tuple for metrics | |
| # We don't modify hidden_states - just compute quality scores | |
| if hasattr(self, 'self_evaluation'): | |
| _ = self.self_evaluation(hidden_states) # Compute but don't assign | |
| return hidden_states | |