SLM 1.0
SLM 1.0 is a specialized language model trained by NeuroBrain, optimized for structured output generation, JSON schema compliance, and tool calling capabilities.
Model Details
Model Description
SLM 1.0 is a language model specifically trained to excel at:
-
Structured Output: Generating well-formatted, structured responses
-
JSON Schema: Producing outputs that strictly adhere to JSON schemas
-
Tool Calling: Effectively utilizing and calling external tools and functions
This model has been trained by NeuroBrain to provide reliable, structured responses suitable for production applications requiring precise output formatting.
Model Specifications
-
Architecture: SLM1ForCausalLM
-
Model Type: Causal Language Model
-
Context Length: 32,768 tokens
-
Hidden Size: 1,536
-
Number of Layers: 28
-
Attention Heads: 12
-
Vocabulary Size: 151,936
Training Information
-
Trained by: NeuroBrain
-
Training Method: Trained for structured output, JSON schema compliance, and tool calling
Usage
Basic Usage
1from transformers import AutoModelForCausalLM, AutoTokenizer
2
3model_name = "sihab/slm-1.0"
4
5tokenizer = AutoTokenizer.from_pretrained(model_name)
6model = AutoModelForCausalLM.from_pretrained(model_name)
7
8# Example: Generate structured output
9prompt = "Generate a JSON object with user information"
10inputs = tokenizer(prompt, return_tensors="pt")
11outputs = model.generate(**inputs, max_length=512)
12response = tokenizer.decode(outputs[0], skip_special_tokens=True)
Structured Output Generation
SLM 1.0 is particularly effective when you need structured outputs:
1prompt = """
2Generate a JSON object following this schema:
3{
4 "name": "string",
5 "age": "number",
6 "email": "string"
7}
8"""
9
10inputs = tokenizer(prompt, return_tensors="pt")
11outputs = model.generate(**inputs, max_length=512, temperature=0.7)
12response = tokenizer.decode(outputs[0], skip_special_tokens=True)
Tool Calling
The model is optimized for tool calling scenarios:
1prompt = """
2Available tools:
3- get_weather(location: str)
4- send_email(to: str, subject: str, body: str)
5
6User request: Check the weather in Paris and send me an email with the result.
7"""
8
9inputs = tokenizer(prompt, return_tensors="pt")
10outputs = model.generate(**inputs, max_length=1024)
11response = tokenizer.decode(outputs[0], skip_special_tokens=True)
Model Performance
SLM 1.0 demonstrates strong performance in:
-
JSON schema compliance
-
Structured data generation
-
Tool calling accuracy
-
Function parameter extraction
Limitations
-
The model may occasionally require post-processing to ensure strict JSON compliance
-
Tool calling accuracy depends on the clarity of tool descriptions provided
-
Maximum context length is 32,768 tokens
Citation
If you use SLM 1.0 in your research or applications, please cite:
1@misc{slm1.0,
2 title={SLM 1.0: A Language Model for Structured Output and Tool Calling},
3 author={NeuroBrain},
4 year={2025},
5 howpublished={\url{https://huggingface.co/sihab/slm-1.0}}
6}
License
This model is licensed under the Apache 2.0 license.
Contact
For questions, issues, or contributions, please contact NeuroBrain.
Model trained by NeuroBrain