Text Generation
Transformers
Safetensors
English
qwen3
mergekit
Merge
text-generation-inference
code
coder
withinusai
Instructions to use WithinUsAI/Darwin-Astral-Coder-4B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use WithinUsAI/Darwin-Astral-Coder-4B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="WithinUsAI/Darwin-Astral-Coder-4B")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("WithinUsAI/Darwin-Astral-Coder-4B") model = AutoModelForCausalLM.from_pretrained("WithinUsAI/Darwin-Astral-Coder-4B") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use WithinUsAI/Darwin-Astral-Coder-4B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "WithinUsAI/Darwin-Astral-Coder-4B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "WithinUsAI/Darwin-Astral-Coder-4B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/WithinUsAI/Darwin-Astral-Coder-4B
- SGLang
How to use WithinUsAI/Darwin-Astral-Coder-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 "WithinUsAI/Darwin-Astral-Coder-4B" \ --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": "WithinUsAI/Darwin-Astral-Coder-4B", "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 "WithinUsAI/Darwin-Astral-Coder-4B" \ --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": "WithinUsAI/Darwin-Astral-Coder-4B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use WithinUsAI/Darwin-Astral-Coder-4B with Docker Model Runner:
docker model run hf.co/WithinUsAI/Darwin-Astral-Coder-4B
| license: other | |
| library_name: transformers | |
| base_model: | |
| - LucidityAI/Astral-4B-Coder | |
| - openfree/Darwin-Qwen3-4B | |
| - Qwen/Qwen3-4B | |
| tags: | |
| - qwen3 | |
| - mergekit | |
| - merge | |
| - text-generation-inference | |
| - code | |
| - coder | |
| - withinusai | |
| language: | |
| - en | |
| datasets: | |
| - LucidityAI/Astral-Post-Training-Dataset | |
| pipeline_tag: text-generation | |
| # Darwin-Astral-4B-Coder | |
| **Darwin-Astral-4B-Coder** is a merged 4B-class coding model release from **WithIn Us AI**, designed for code generation, instruction-following, and practical developer-assistant workflows. | |
| This repository is distributed as a standard **Transformers** checkpoint in **Safetensors** format and is positioned as a merge-based model that blends Darwin-style and Astral-style coding traits within a Qwen3-family 4B backbone. | |
| ## Model Summary | |
| This model is intended for: | |
| - code generation | |
| - code explanation | |
| - debugging assistance | |
| - implementation planning | |
| - instruction-following | |
| - developer assistant workflows | |
| - local or hosted coding inference | |
| As a 4B-class model, it aims to balance stronger coding capability than very small models with a lighter deployment footprint than larger coder checkpoints. | |
| ## Base Model Lineage | |
| The current repository metadata lists the following upstream model references: | |
| - `LucidityAI/Astral-4B-Coder` | |
| - `openfree/Darwin-Qwen3-4B` | |
| - `Qwen/Qwen3-4B` | |
| The visible merge configuration in the README also shows: | |
| - `Qwen/Qwen3-4B-Instruct-2507` as the base model in the YAML block | |
| - `Lucidity-AI-Astral-4B-Coder` as a merge source | |
| - `openfree-Darwin-Qwen3-4B` as a merge source | |
| These names are preserved here as shown on the repository page. | |
| ## Merge Details | |
| According to the current README: | |
| - this model is a merge of pre-trained language models | |
| - it was created using **mergekit** | |
| - the **SLERP** merge method was used | |
| The repository also includes a visible `mergekit_config.yml`, which supports the merge-based packaging of the release. | |
| ## Dataset Lineage | |
| The repository page currently shows the following dataset association: | |
| - `LucidityAI/Astral-Post-Training-Dataset` | |
| This suggests coding or post-training lineage connected to the Astral family used in the merge. | |
| ## Intended Use | |
| Recommended use cases include: | |
| - coding assistant experiments | |
| - generating utility functions and scripts | |
| - explaining code and technical concepts | |
| - debugging support | |
| - step-by-step implementation planning | |
| - local developer tools | |
| - hosted text-generation workflows for software tasks | |
| ## Suggested Use Cases | |
| This model can be useful for: | |
| - drafting Python, JavaScript, or general-purpose code | |
| - proposing refactors | |
| - generating boilerplate | |
| - answering developer questions | |
| - comparing implementation approaches | |
| - producing structured technical responses | |
| ## Out-of-Scope Use | |
| This model should not be relied on for: | |
| - legal advice | |
| - medical advice | |
| - financial advice | |
| - safety-critical automation | |
| - autonomous production engineering without review | |
| - security-critical code without expert validation | |
| All generated code should be reviewed, tested, and validated before real-world deployment. | |
| ## Repository Contents | |
| The repository currently includes standard Hugging Face model assets such as: | |
| - `README.md` | |
| - `.gitattributes` | |
| - `added_tokens.json` | |
| - `config.json` | |
| - `mergekit_config.yml` | |
| - `merges.txt` | |
| - `model-00001-of-00002.safetensors` | |
| - `model-00002-of-00002.safetensors` | |
| - `model.safetensors.index.json` | |
| - `special_tokens_map.json` | |
| - `tokenizer.json` | |
| - `tokenizer_config.json` | |
| ## Prompting Guidance | |
| This model will usually work best with prompts that are: | |
| - direct | |
| - scoped to a clear task | |
| - explicit about the language or framework | |
| - clear about whether code, explanation, or both are wanted | |
| - structured when step-by-step reasoning is useful | |
| ### Example prompt styles | |
| **Code generation** | |
| > Write a Python function that loads a JSON file, validates required keys, and returns cleaned records. | |
| **Debugging** | |
| > Explain why this code raises a KeyError and provide a safer corrected version. | |
| **Implementation planning** | |
| > Create a step-by-step plan for building a FastAPI service with authentication, logging, and tests. | |
| **Refactoring** | |
| > Refactor this function for readability and add basic error handling. | |
| ## Strengths | |
| This model may be especially useful for: | |
| - blended coding workflows | |
| - practical developer assistance | |
| - moderate-size local inference | |
| - structured software-task prompting | |
| - merge-model experimentation | |
| - compact coder deployments | |
| ## Limitations | |
| Like other merged 4B-class language models, this model may: | |
| - hallucinate APIs or implementation details | |
| - generate incomplete or incorrect code | |
| - produce insecure patterns | |
| - make reasoning mistakes on harder prompts | |
| - require prompt iteration for best results | |
| - need human validation before real-world use | |
| ## Attribution | |
| **WithIn Us AI** is the publisher of this merged model release. | |
| Credit for upstream assets remains with their original creators. The repository metadata and README specifically reference: | |
| - `LucidityAI/Astral-4B-Coder` | |
| - `openfree/Darwin-Qwen3-4B` | |
| - `Qwen/Qwen3-4B` | |
| - `Qwen/Qwen3-4B-Instruct-2507` | |
| and the dataset: | |
| - `LucidityAI/Astral-Post-Training-Dataset` | |
| ## License | |
| This draft uses: | |
| - `license: other` | |
| If you maintain this repo, replace this with the exact license terms you want displayed and make sure they align with any upstream obligations from the referenced source models and datasets. | |
| ## Acknowledgments | |
| Thanks to: | |
| - **WithIn Us AI** | |
| - **LucidityAI** | |
| - **openfree** | |
| - **Qwen** | |
| - the **mergekit** ecosystem | |
| - the Hugging Face platform | |
| - the broader open-source LLM community | |
| ## Disclaimer | |
| This model may produce inaccurate, insecure, biased, incomplete, or misleading outputs. All important generations, especially code and technical guidance, should be reviewed and tested before real-world use. |