初始化项目,由ModelHub XC社区提供模型
Model: Neura-Tech-AI/Neuron-V1-3B-Instruct Source: Original Platform
This commit is contained in:
36
.gitattributes
vendored
Normal file
36
.gitattributes
vendored
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.arrow filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.bin filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.ckpt filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.ftz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.h5 filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.joblib filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.lfs.* filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.mlmodel filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.model filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.msgpack filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.npy filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.npz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.onnx filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.ot filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.parquet filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.pb filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.pickle filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.pkl filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.pt filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.pth filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.rar filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.safetensors filter=lfs diff=lfs merge=lfs -text
|
||||||
|
saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.tar.* filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.tar filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.tflite filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.wasm filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.zst filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
||||||
|
tokenizer.json filter=lfs diff=lfs merge=lfs -text
|
||||||
165
README.md
Normal file
165
README.md
Normal file
@@ -0,0 +1,165 @@
|
|||||||
|
---
|
||||||
|
language:
|
||||||
|
- en
|
||||||
|
- hi
|
||||||
|
tags:
|
||||||
|
- neuron
|
||||||
|
- neura-tech-ai
|
||||||
|
- 3B
|
||||||
|
- text-generation
|
||||||
|
license: apache-2.0
|
||||||
|
license_name: qwen-research
|
||||||
|
license_link: https://github.com/QwenLM/Qwen2.5/blob/main/LICENSE
|
||||||
|
datasets:
|
||||||
|
- custom-neura-tech-data
|
||||||
|
metrics:
|
||||||
|
- accuracy
|
||||||
|
base_model:
|
||||||
|
- Qwen/Qwen2.5-3B-Instruct
|
||||||
|
pipeline_tag: text-generation
|
||||||
|
library_name: transformers
|
||||||
|
---
|
||||||
|
|
||||||
|
# 🧠 Neura-Tech-AI/Neuron-V1-3B-Instruct: The Official Intelligence of Neura Tech AI
|
||||||
|
|
||||||
|
**Neuron-V1-3B-Instruct** is a high-performance, fine-tuned Large Language Model (LLM) developed by **Neura Tech AI**. Engineered as a localized and standalone model, it serves as an optimized assistant for advanced reasoning, creative synthesis, and structured multilingual communication.
|
||||||
|
|
||||||
|
This model features permanently fused LoRA adapters natively merged into the core layers to eliminate external package dependencies and structural validation errors during production inference.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 🏢 Organization Identity
|
||||||
|
* **Company**: Neura Tech AI
|
||||||
|
* **Project Name**: Neuron-V1-3B-Instruct
|
||||||
|
* **Lead Architect**: Samarth Anand Pathak
|
||||||
|
|
||||||
|
## 📊 Model Specifications
|
||||||
|
* **Architecture**: Causal Language Model (Fine-tuned and permanently fused from Qwen2.5-3B-Instruct)
|
||||||
|
* **Parameters**: ~3.09 Billion
|
||||||
|
* **Precision**: FP16 (Float16)
|
||||||
|
* **Context Window**: 32K tokens
|
||||||
|
* **Format**: ChatML Compatible (Native padding and Chat Templates pre-configured)
|
||||||
|
* **License**: Subject to the **Qwen Research License Agreement** (Inherited from the base Qwen2.5 architecture)
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 🎯 Core Capabilities
|
||||||
|
* **Multilingual Proficiency**: Highly optimized for seamless contextual understanding across English, Hindi, and hybrid code-switched linguistic frameworks (Hinglish).
|
||||||
|
* **Native Identity Alignment**: Embedded with strict core system safety layers that maintain the model's structural identity as an agent of Neura Tech AI.
|
||||||
|
* **Production Edge Readiness**: Ultra-low memory footprint (~10 GB VRAM in standard Float16 execution) making it highly viable for localized consumer-grade hardware.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 📈 Standard Benchmark & Evaluation Setup
|
||||||
|
|
||||||
|
To assess Project Neuron's generation stability, execution latency, and instruction-following consistency, use the baseline quantitative evaluation pipeline below.
|
||||||
|
|
||||||
|
### 1. Benchmark Testing Pipeline (`benchmark_eval.py`)
|
||||||
|
```python
|
||||||
|
import time
|
||||||
|
import torch
|
||||||
|
from transformers import AutoModelForCausalLM, AutoTokenizer
|
||||||
|
|
||||||
|
model_path = "Neura-Tech-AI/Neuron-V1-3B-Instruct"
|
||||||
|
|
||||||
|
print("🎯 Initializing Project Neuron Evaluation Suite...")
|
||||||
|
tokenizer = AutoTokenizer.from_pretrained(model_path)
|
||||||
|
model = AutoModelForCausalLM.from_pretrained(model_path, torch_dtype=torch.float16).to("cuda")
|
||||||
|
|
||||||
|
eval_prompts = [
|
||||||
|
"Tell me about Project Neuron in short. What is its scale?",
|
||||||
|
"Explain quantum computing in simple Hindi lyrics.",
|
||||||
|
"Write a secure python API routing block for model inference."
|
||||||
|
]
|
||||||
|
|
||||||
|
def run_performance_test(prompt):
|
||||||
|
messages = [
|
||||||
|
{"role": "system", "content": "You are Neuron, an advanced AI system developed by Neura Tech AI."},
|
||||||
|
{"role": "user", "content": prompt}
|
||||||
|
]
|
||||||
|
text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
|
||||||
|
inputs = tokenizer([text], return_tensors="pt").to("cuda")
|
||||||
|
input_len = inputs.input_ids.shape[1]
|
||||||
|
|
||||||
|
start_time = time.time()
|
||||||
|
with torch.no_grad():
|
||||||
|
outputs = model.generate(
|
||||||
|
**inputs,
|
||||||
|
max_new_tokens=150,
|
||||||
|
temperature=0.1,
|
||||||
|
do_sample=False,
|
||||||
|
pad_token_id=tokenizer.eos_token_id
|
||||||
|
)
|
||||||
|
latency = time.time() - start_time
|
||||||
|
|
||||||
|
generated_tokens = outputs[0][input_len:]
|
||||||
|
token_count = len(generated_tokens)
|
||||||
|
tokens_per_second = token_count / latency
|
||||||
|
|
||||||
|
response = tokenizer.decode(generated_tokens, skip_special_tokens=True).strip()
|
||||||
|
return latency, tokens_per_second, response
|
||||||
|
|
||||||
|
print("\n--- Running Quantitative Evaluation Matrix ---")
|
||||||
|
for i, prompt in enumerate(eval_prompts, 1):
|
||||||
|
lat, tps, resp = run_performance_test(prompt)
|
||||||
|
print(f"\n📊 Test Case #{i}: '{prompt}'")
|
||||||
|
print(f"⏱️ Latency: {lat:.2f}s | ⚡ Speed: {tps:.2f} tokens/sec")
|
||||||
|
print(f"🤖 Output:\n{resp}\n" + "-"*40)
|
||||||
|
```
|
||||||
|
|
||||||
|
## 2. Operational Thresholds
|
||||||
|
Throughput Speed: Maintains an average runtime acceleration of ~40-50 tokens/sec under stable CUDA configurations.
|
||||||
|
VRAM Overhead: VRAM consumption balances at approximately ~10.5 GB to 12 GB peak during deep batch text token processing.
|
||||||
|
|
||||||
|
## 🛠️ Quick Start & Native Slicing Inference
|
||||||
|
|
||||||
|
To prevent system prompt token leakage and enforce pure output retrieval during standard usage loops, apply explicit token slicing as shown below:
|
||||||
|
```python
|
||||||
|
import torch
|
||||||
|
from transformers import AutoModelForCausalLM, AutoTokenizer
|
||||||
|
|
||||||
|
model_id = "Neura-Tech-AI/Neuron-V1-3B-Instruct"
|
||||||
|
|
||||||
|
# Load Standalone Tokenizer & Fused Core Weights
|
||||||
|
tokenizer = AutoTokenizer.from_pretrained(model_id)
|
||||||
|
model = AutoModelForCausalLM.from_pretrained(
|
||||||
|
model_id,
|
||||||
|
torch_dtype=torch.float16,
|
||||||
|
device_map="auto"
|
||||||
|
)
|
||||||
|
|
||||||
|
# Standard Query Payload
|
||||||
|
messages = [
|
||||||
|
{"role": "system", "content": "You are Project Neuron, an advanced AI system developed by Neura Tech AI."},
|
||||||
|
{"role": "user", "content": "tu kon hai be."}
|
||||||
|
]
|
||||||
|
|
||||||
|
# Apply Native Tokenization Layout
|
||||||
|
text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
|
||||||
|
inputs = tokenizer([text], return_tensors="pt").to("cuda")
|
||||||
|
|
||||||
|
# Run Stable Token Generation
|
||||||
|
outputs = model.generate(
|
||||||
|
**inputs,
|
||||||
|
max_new_tokens=100,
|
||||||
|
temperature=0.3,
|
||||||
|
do_sample=True,
|
||||||
|
top_p=0.9,
|
||||||
|
pad_token_id=tokenizer.eos_token_id
|
||||||
|
)
|
||||||
|
|
||||||
|
# Input-Length Slicing for explicit assistant reply isolation
|
||||||
|
input_len = inputs.input_ids.shape[1]
|
||||||
|
clean_reply = tokenizer.decode(outputs[0][input_len:], skip_special_tokens=True).strip()
|
||||||
|
|
||||||
|
print(f"🤖 Project Neuron Reply:\n{clean_reply}")
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
## 📜 License & Usage Limitations
|
||||||
|
1. Developer Custom Copyright
|
||||||
|
Copyright © 2026, **Samarth Anand Pathak** & **Neura Tech AI**. All rights reserved.
|
||||||
|
The fine-tuning architectures, dataset processing schemas, and merged checkpoint matrices remain proprietary implementations managed under **Neura Tech AI Research Divisions**.
|
||||||
|
2. Base Model Inherited License
|
||||||
|
As an architecture structurally built on top of the open-weights distribution of Qwen2.5-3B-Instruct, any downstream deployment, distribution, or commercial usage of this checkpoint must strictly comply with the terms, conditional clauses, and safety restrictions of the Qwen Research License Agreement issued by Alibaba Cloud.
|
||||||
|
## © 2026 Neura Tech AI. All Rights Reserved.
|
||||||
54
chat_template.jinja
Normal file
54
chat_template.jinja
Normal file
@@ -0,0 +1,54 @@
|
|||||||
|
{%- if tools %}
|
||||||
|
{{- '<|im_start|>system\n' }}
|
||||||
|
{%- if messages[0]['role'] == 'system' %}
|
||||||
|
{{- messages[0]['content'] }}
|
||||||
|
{%- else %}
|
||||||
|
{{- 'You are Neuron, created by Neura Tech AI. You are a helpful assistant.' }}
|
||||||
|
{%- endif %}
|
||||||
|
{{- "\n\n# Tools\n\nYou may call one or more functions to assist with the user query.\n\nYou are provided with function signatures within <tools></tools> XML tags:\n<tools>" }}
|
||||||
|
{%- for tool in tools %}
|
||||||
|
{{- "\n" }}
|
||||||
|
{{- tool | tojson }}
|
||||||
|
{%- endfor %}
|
||||||
|
{{- "\n</tools>\n\nFor each function call, return a json object with function name and arguments within <tool_call></tool_call> XML tags:\n<tool_call>\n{\"name\": <function-name>, \"arguments\": <args-json-object>}\n</tool_call><|im_end|>\n" }}
|
||||||
|
{%- else %}
|
||||||
|
{%- if messages[0]['role'] == 'system' %}
|
||||||
|
{{- '<|im_start|>system\n' + messages[0]['content'] + '<|im_end|>\n' }}
|
||||||
|
{%- else %}
|
||||||
|
{{- '<|im_start|>system\nYou are Neuron, created by Neura Tech AI. You are a helpful assistant.<|im_end|>\n' }}
|
||||||
|
{%- endif %}
|
||||||
|
{%- endif %}
|
||||||
|
{%- for message in messages %}
|
||||||
|
{%- if (message.role == "user") or (message.role == "system" and not loop.first) or (message.role == "assistant" and not message.tool_calls) %}
|
||||||
|
{{- '<|im_start|>' + message.role + '\n' + message.content + '<|im_end|>' + '\n' }}
|
||||||
|
{%- elif message.role == "assistant" %}
|
||||||
|
{{- '<|im_start|>' + message.role }}
|
||||||
|
{%- if message.content %}
|
||||||
|
{{- '\n' + message.content }}
|
||||||
|
{%- endif %}
|
||||||
|
{%- for tool_call in message.tool_calls %}
|
||||||
|
{%- if tool_call.function is defined %}
|
||||||
|
{%- set tool_call = tool_call.function %}
|
||||||
|
{%- endif %}
|
||||||
|
{{- '\n<tool_call>\n{"name": "' }}
|
||||||
|
{{- tool_call.name }}
|
||||||
|
{{- '", "arguments": ' }}
|
||||||
|
{{- tool_call.arguments | tojson }}
|
||||||
|
{{- '}\n</tool_call>' }}
|
||||||
|
{%- endfor %}
|
||||||
|
{{- '<|im_end|>\n' }}
|
||||||
|
{%- elif message.role == "tool" %}
|
||||||
|
{%- if (loop.index0 == 0) or (messages[loop.index0 - 1].role != "tool") %}
|
||||||
|
{{- '<|im_start|>user' }}
|
||||||
|
{%- endif %}
|
||||||
|
{{- '\n<tool_response>\n' }}
|
||||||
|
{{- message.content }}
|
||||||
|
{{- '\n</tool_response>' }}
|
||||||
|
{%- if loop.last or (messages[loop.index0 + 1].role != "tool") %}
|
||||||
|
{{- '<|im_end|>\n' }}
|
||||||
|
{%- endif %}
|
||||||
|
{%- endif %}
|
||||||
|
{%- endfor %}
|
||||||
|
{%- if add_generation_prompt %}
|
||||||
|
{{- '<|im_start|>assistant\n' }}
|
||||||
|
{%- endif %}
|
||||||
69
config.json
Normal file
69
config.json
Normal file
@@ -0,0 +1,69 @@
|
|||||||
|
{
|
||||||
|
"architectures": [
|
||||||
|
"Qwen2ForCausalLM"
|
||||||
|
],
|
||||||
|
"attention_dropout": 0.0,
|
||||||
|
"bos_token_id": 151643,
|
||||||
|
"dtype": "float16",
|
||||||
|
"eos_token_id": 151645,
|
||||||
|
"hidden_act": "silu",
|
||||||
|
"hidden_size": 2048,
|
||||||
|
"initializer_range": 0.02,
|
||||||
|
"intermediate_size": 11008,
|
||||||
|
"layer_types": [
|
||||||
|
"full_attention",
|
||||||
|
"full_attention",
|
||||||
|
"full_attention",
|
||||||
|
"full_attention",
|
||||||
|
"full_attention",
|
||||||
|
"full_attention",
|
||||||
|
"full_attention",
|
||||||
|
"full_attention",
|
||||||
|
"full_attention",
|
||||||
|
"full_attention",
|
||||||
|
"full_attention",
|
||||||
|
"full_attention",
|
||||||
|
"full_attention",
|
||||||
|
"full_attention",
|
||||||
|
"full_attention",
|
||||||
|
"full_attention",
|
||||||
|
"full_attention",
|
||||||
|
"full_attention",
|
||||||
|
"full_attention",
|
||||||
|
"full_attention",
|
||||||
|
"full_attention",
|
||||||
|
"full_attention",
|
||||||
|
"full_attention",
|
||||||
|
"full_attention",
|
||||||
|
"full_attention",
|
||||||
|
"full_attention",
|
||||||
|
"full_attention",
|
||||||
|
"full_attention",
|
||||||
|
"full_attention",
|
||||||
|
"full_attention",
|
||||||
|
"full_attention",
|
||||||
|
"full_attention",
|
||||||
|
"full_attention",
|
||||||
|
"full_attention",
|
||||||
|
"full_attention",
|
||||||
|
"full_attention"
|
||||||
|
],
|
||||||
|
"max_position_embeddings": 32768,
|
||||||
|
"max_window_layers": 70,
|
||||||
|
"model_type": "qwen2",
|
||||||
|
"num_attention_heads": 16,
|
||||||
|
"num_hidden_layers": 36,
|
||||||
|
"num_key_value_heads": 2,
|
||||||
|
"pad_token_id": null,
|
||||||
|
"rms_norm_eps": 1e-06,
|
||||||
|
"rope_parameters": {
|
||||||
|
"rope_theta": 1000000.0,
|
||||||
|
"rope_type": "default"
|
||||||
|
},
|
||||||
|
"sliding_window": null,
|
||||||
|
"tie_word_embeddings": true,
|
||||||
|
"transformers_version": "5.9.0",
|
||||||
|
"use_cache": true,
|
||||||
|
"use_sliding_window": false,
|
||||||
|
"vocab_size": 151936
|
||||||
|
}
|
||||||
11
generation_config.json
Normal file
11
generation_config.json
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
{
|
||||||
|
"bos_token_id": 151643,
|
||||||
|
"do_sample": false,
|
||||||
|
"eos_token_id": [
|
||||||
|
151645,
|
||||||
|
151643
|
||||||
|
],
|
||||||
|
"pad_token_id": 151643,
|
||||||
|
"repetition_penalty": 1.05,
|
||||||
|
"transformers_version": "5.9.0"
|
||||||
|
}
|
||||||
151387
merges.txt
Normal file
151387
merges.txt
Normal file
File diff suppressed because it is too large
Load Diff
3
model.safetensors
Normal file
3
model.safetensors
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:71e343cd330ea7c53e011d733e8b1a63c636b0f18b136cfc506ed1892bfd0f87
|
||||||
|
size 6171926680
|
||||||
3
tokenizer.json
Normal file
3
tokenizer.json
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:3fd169731d2cbde95e10bf356d66d5997fd885dd8dbb6fb4684da3f23b2585d8
|
||||||
|
size 11421892
|
||||||
30
tokenizer_config.json
Normal file
30
tokenizer_config.json
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
{
|
||||||
|
"add_prefix_space": false,
|
||||||
|
"backend": "tokenizers",
|
||||||
|
"bos_token": null,
|
||||||
|
"clean_up_tokenization_spaces": false,
|
||||||
|
"eos_token": "<|im_end|>",
|
||||||
|
"errors": "replace",
|
||||||
|
"extra_special_tokens": [
|
||||||
|
"<|im_start|>",
|
||||||
|
"<|im_end|>",
|
||||||
|
"<|object_ref_start|>",
|
||||||
|
"<|object_ref_end|>",
|
||||||
|
"<|box_start|>",
|
||||||
|
"<|box_end|>",
|
||||||
|
"<|quad_start|>",
|
||||||
|
"<|quad_end|>",
|
||||||
|
"<|vision_start|>",
|
||||||
|
"<|vision_end|>",
|
||||||
|
"<|vision_pad|>",
|
||||||
|
"<|image_pad|>",
|
||||||
|
"<|video_pad|>"
|
||||||
|
],
|
||||||
|
"is_local": false,
|
||||||
|
"local_files_only": false,
|
||||||
|
"model_max_length": 131072,
|
||||||
|
"pad_token": "<|endoftext|>",
|
||||||
|
"split_special_tokens": false,
|
||||||
|
"tokenizer_class": "Qwen2Tokenizer",
|
||||||
|
"unk_token": null
|
||||||
|
}
|
||||||
1
vocab.json
Normal file
1
vocab.json
Normal file
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user