CoolFace
Modelpublic

yasserrmd/qwen3-4b-agentic-reasoner

sourceHugging Faceupdated 1y agoView on Hugging Face
4likes14downloads
Model Card

Qwen3-4B-Agentic-Reasoner

<img src="modelcard.png" widhth="400"/>

yasserrmd/qwen3-4b-agentic-reasoner is a merged model that combines the agentic instruction-following strength of Menlo/Jan-nano with the reasoning and structured thought capabilities of POLARIS-Project/Polaris-4B-Preview, using the Qwen/Qwen3-4B architecture as the base.

This merge was performed using mergekit and the TIES method for fine-grained parameter blending.


๐Ÿง  Intended Use

This model is intended for use in:

  • โ€”Multi-step reasoning tasks
  • โ€”Agent-style instruction following (CLI assistants, web automation)
  • โ€”Educational assistance, planning, and explanation
  • โ€”Natural language code generation, JSON/schema design
  • โ€”Legal, productivity, and roleplay simulations

๐Ÿงช Merge Details

๐Ÿ”€ Merge Method

This model was merged using the TIES merge method with the Qwen/Qwen3-4B as the base model.

๐Ÿค Models Merged

ModelRole
POLARIS-Project/Polaris-4B-PreviewDeep reasoning & CoT
Menlo/Jan-nanoAgentic & Instruction-following

โš™๏ธ Configuration

yaml
models:
  - model: POLARIS-Project/Polaris-4B-Preview
    parameters:
      weight: 0.5
  - model: Menlo/Jan-nano
    parameters:
      weight: 0.5
merge_method: ties
base_model: Qwen/Qwen3-4B
parameters:
  normalize: true
  int8_mask: true
dtype: float16

๐Ÿ“Š Prompt Evaluation

This model was evaluated on handcrafted prompts covering:

  • โ€”Chain-of-thought reasoning
  • โ€”Math and logic
  • โ€”Code writing and CLI instructions
  • โ€”JSON/schema generation
  • โ€”Role-based planning and writing tasks
  • โ€”Arabic translation
  • โ€”Legal drafting

โœ… Performance Highlights

CriterionResult
CoT ReasoningExcellent (multi-step math, planning)
Agentic TasksStrong (shell scripts, terminal agents)
Code OutputClean formatting and logical structure
Format AwarenessRecognizes JSON, email, legal structure
Instruction Follow-throughReliable and contextual
Language TasksAccurate Arabic translation, paraphrase

Average prompt score (0โ€“3 scale): 2.15 All outputs were logical, well-structured, and contextually accurate for the prompt types.


๐Ÿš€ Inference

To use the model:

python
from transformers import AutoTokenizer, AutoModelForCausalLM

model_id = "yasserrmd/qwen3-4b-agentic-reasoner"

tokenizer = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(model_id, torch_dtype="auto", device_map="auto", trust_remote_code=True)

prompt = "Plan the first 3 steps for launching a nonprofit AI education platform."
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
outputs = model.generate(**inputs, max_new_tokens=512)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))

โš ๏ธ License & Use

Respect the licenses of the original merged models. This model is released for research and personal experimentation purposes.


๐Ÿ™ Acknowledgments

Thanks to the teams behind:

  • โ€”Alibaba's Qwen3 series
  • โ€”Menlo/Jan-nano project
  • โ€”POLARIS RL framework
  • โ€”MergeKit by @cg123

Model by @yasserrmd