# 🌟 InnoSpark 🌟 [![Official Website](https://img.shields.io/badge/🌐-Official%20Website-blue?style=for-the-badge)](https://innospark.aiecnu.cn/innospark/) [![Hugging Face](https://img.shields.io/badge/πŸ€—-Hugging%20Face-yellow?style=for-the-badge)](https://huggingface.co/sii-research) [![GitHub](https://img.shields.io/badge/πŸ’»-GitHub-black?style=for-the-badge)](https://github.com/Inno-Spark/elmes)

πŸš€ Advanced Educational Large Language Model

**Language / 语言**: English | [δΈ­ζ–‡](README_zh.md)
--- ## πŸ“– Project Introduction **InnoSpark** is an advanced educational large language model independently developed by the School of Intelligence Education at East China Normal University and Shanghai Innovation Institute. It aims to explore the deep application of artificial intelligence technology in the field of education. Based on the domestic Qwen large language model with secondary pre-training, combined with subdomain fine-tuning and reinforcement learning for educational scenarios, we have launched InnoSpark-1.0. ## πŸ”— Related Resources ### πŸ“± Main Products - **Homepage**: [InnoSpark Official](https://innospark.aiecnu.cn/innospark/) - **RM Model**: [InnoSpark-HPC-RM-32B](https://huggingface.co/sii-research/InnoSpark-HPC-RM-32B) - **Educational Evaluation System**: [ELMES](https://github.com/Inno-Spark/elmes) ### πŸ€– Model Series | Model Version | Parameters | Link | |---------------|------------|------| | **InnoSpark-min** | 0.5B | [πŸ”— Download](https://huggingface.co/sii-research/InnoSpark-0.5B-0717) | | **InnoSpark-turbo** | 7B | [πŸ”— Download](https://huggingface.co/sii-research/InnoSpark-7B-0715) | | **InnoSpark-plus** | 72B | [πŸ”— Standard](https://huggingface.co/sii-research/InnoSpark-72B-0710) / [πŸ”— Inference](https://huggingface.co/sii-research/InnoSpark-R-72B-0701) | ### πŸ“Š Datasets - **Model Scoring Dataset**: [HPC-LLM-8k](https://huggingface.co/datasets/ECNU-InnoSpark/HPC-LLM-8k) - **Human Scoring Dataset**: [HPC-Human-8k](https://huggingface.co/datasets/ECNU-InnoSpark/HPC-Human-8k) ## πŸš€ Quickstart Here provides a code snippet with `apply_chat_template` to show you how to load the tokenizer and model and how to generate contents. ```python from transformers import AutoModelForCausalLM, AutoTokenizer device = "cuda" # the device to load the model onto model = AutoModelForCausalLM.from_pretrained( "sii-research/InnoSpark-72B-0710", torch_dtype="auto", device_map="auto" ) tokenizer = AutoTokenizer.from_pretrained("sii-research/InnoSpark-72B-0710") prompt = "Introduce yourself in detail." messages = [ {"role": "system", "content": "You are InnoSparkοΌˆε―εˆ›οΌ‰, created by Shanghai Innovation Institute οΌˆδΈŠζ΅·εˆ›ζ™Ίε­¦ι™’οΌ‰ and East China Normal University(εŽδΈœεΈˆθŒƒε€§ε­¦). You are a helpful assistant."}, {"role": "user", "content": prompt} ] text = tokenizer.apply_chat_template( messages, tokenize=False, add_generation_prompt=True ) model_inputs = tokenizer([text], return_tensors="pt").to(device) generated_ids = model.generate( model_inputs.input_ids, max_new_tokens=512 ) generated_ids = [ output_ids[len(input_ids):] for input_ids, output_ids in zip(model_inputs.input_ids, generated_ids) ] response = tokenizer.batch_decode(generated_ids, skip_special_tokens=True)[0] ``` ### VLLM We recommend deploying our model using 4 A100 GPUs. You can run the vllm server-side with the following code in terminal: ```python python -m vllm.entrypoints.openai.api_server --served-model-name InnoSpark --model path/to/InnoSpark --gpu-memory-utilization 0.98 --tensor-parallel-size 4 --port 6000 ``` Then, you can use the following code to deploy client-side: ```python import requests import json def Innospark_stream(inputs,history): url = 'http://loaclhost:6000/v1/chat/completions' history+=[{"role": "user", "content": inputs},] headers = {"User-Agent": "vLLM Client"} pload = { "model": "InnoSpark", "stream": True, "messages": history } response = requests.post(url, headers=headers, json=pload, stream=True) for chunk in response.iter_lines(chunk_size=1, decode_unicode=False, delimiter=b"\n"): if chunk: string_data = chunk.decode("utf-8") try: json_data = json.loads(string_data[6:]) delta_content = json_data["choices"][0]["delta"]["content"] assistant_reply+=delta_content yield delta_content except KeyError as e: delta_content = json_data["choices"][0]["delta"]["role"] except json.JSONDecodeError as e: history+=[{ "role": "assistant", "content": assistant_reply, "tool_calls": [] },] delta_content='[DONE]' assert '[DONE]'==chunk.decode("utf-8")[6:] inputs='hi' history=[] for response_text in Innospark_stream(inputs,history): print(response_text,end='') ``` ## 🌟 Core Features ### 🎯 Open Source Product Matrix
**1. πŸ“š InnoSpark Model Series** - 6 models with different parameter scales: min(0.5B), turbo(7B), plus(72B) and their corresponding inference model R versions **2. πŸ” ELMES Evaluation System** - Education Language Model Evaluation System - Automated evaluation system for educational tasks - Helps continuously optimize large model capabilities in teaching scenarios **3. πŸ› οΈ COCLP Data Cleaning Pipeline** - Corpus Cleansing Pipeline - Visual node-based framework based on ComfyUI - Supports OCR, audio/video transcription, format conversion, PII removal, text filtering, and other functions **4. ⭐ HPC-RM Reward Model** - Helpful, Personalization, and Creativity Reward Model - Provides scoring in three educational dimensions: helpfulness, personalization, and creativity - Includes corresponding model scoring and human scoring datasets
## πŸ“ˆ Performance Results We achieved optimal performance in 4 key educational scenarios: ### πŸ† Evaluation Results | Scenario | Performance | |----------|-------------| | πŸ“ Knowledge Explanation | ![Knowledge Explanation](score/demo1.png) | | 🧭 Guided Problem Solving | ![Guided Problem Solving](score/demo2.png) | | πŸ“š Interdisciplinary Lesson Plans | ![Interdisciplinary Lesson Plans](score/demo3.png) | | 🎭 Contextual Question Generation | ![Contextual Question Generation](score/demo4.png) | ### 🎨 Application Examples | Scenario | Demo | |----------|------| | πŸ“– Knowledge Explanation | ![Knowledge Explanation Demo](demo/demo1.png) | | 🎯 Guided Problem Solving | ![Guided Problem Solving Demo](demo/demo2.png) | | 🌟 Interdisciplinary Lesson Plans | ![Interdisciplinary Lesson Plans Demo](demo/demo3.png) | | πŸŽͺ Contextual Question Generation | ![Contextual Question Generation Demo](demo/demo4.png) | ## πŸ›οΈ Technical Support This project is jointly developed by the School of Intelligence Education at East China Normal University and Shanghai Innovation Institute. The reward model was trained using the Verl-Sii training framework provided by Shanghai Innovation Institute. ## πŸ“„ License Please refer to the relevant model pages for specific license information. ---
## 🀝 Contact & Collaboration **East China Normal University - School of Intelligence Education** [![Website](https://img.shields.io/badge/🌐-Visit%20Our%20Website-brightgreen)](https://innospark.aiecnu.cn/innospark/) [![Email](https://img.shields.io/badge/πŸ“§-Contact%20Us-red)](mailto:contact@example.com) --- πŸš€ Empowering Education with AI