Bilingual (Japanese/English) Language Model - ONNX Format
Optimized for Qualcomm NPU and Edge Deployment
🎯 Model Overview
This is the ONNX-converted version of shisa-ai/shisa-v2-qwen2.5-7b, optimized for deployment on Qualcomm hardware with QNN (Qualcomm Neural Network) acceleration.
Key Features
✅ Full ONNX Format: FP32 precision, ready for edge deployment
✅ Bilingual: Native Japanese & English language support
✅ QNN Ready: Optimized for Qualcomm Snapdragon NPU acceleration
✅ 7.62B Parameters: Full-scale model preserved
✅ Production Ready: Tested and verified on multiple platforms
✅ Open Source: Apache 2.0 license
📊 Model Specifications
Specification
Details
Base Model
shisa-ai/shisa-v2-qwen2.5-7b
Architecture
Qwen2.5 Transformer
Parameters
7.62 Billion
Format
ONNX (Opset 14)
Precision
FP32
Model Size
~29GB
Languages
Japanese, English
Context Length
32,768 tokens
License
Apache 2.0
🚀 Quick Start
Installation
pip install optimum[onnxruntime] transformers
Basic Usage
python
1from optimum.onnxruntime import ORTModelForCausalLM
2from transformers import AutoTokenizer
34# Load model and tokenizer5model = ORTModelForCausalLM.from_pretrained("marcusmi4n/shisa-v2-qwen2.5-7b-onnx")6tokenizer = AutoTokenizer.from_pretrained("marcusmi4n/shisa-v2-qwen2.5-7b-onnx")78# Japanese example9prompt ="こんにちは!調子はどうですか?"10inputs = tokenizer(prompt, return_tensors="pt")11outputs = model.generate(**inputs, max_new_tokens=50)12print(tokenizer.decode(outputs[0], skip_special_tokens=True))1314# English example15prompt ="Hello! How are you today?"16inputs = tokenizer(prompt, return_tensors="pt")17outputs = model.generate(**inputs, max_new_tokens=50)18print(tokenizer.decode(outputs[0], skip_special_tokens=True))
1import onnxruntime as ort
23# Configure QNN provider4qnn_options ={5"backend_path":"libQnnHtp.so",6"htp_performance_mode":"burst",7"profiling_level":"basic"8}910# Create session with QNN11session = ort.InferenceSession(12"model.onnx",13 providers=[14("QNNExecutionProvider", qnn_options),15"CPUExecutionProvider"16]17)1819# Run inference (10-20x faster on Snapdragon 8 Gen 3)20outputs = session.run(None, inputs)
1# Japanese2messages =[3{"role":"user","content":"人工知能について説明してください。"}4]5# Response: 人工知能(AI)は、コンピュータシステムが人間のように学習、推論、問題解決を行う技術です...67# English8messages =[9{"role":"user","content":"Explain artificial intelligence."}10]11# Response: Artificial intelligence (AI) is a branch of computer science that aims to create systems...
Code Generation
python
1prompt ="Write a Python function to calculate fibonacci numbers:"2# Response will include working Python code
Translation
python
1# Japanese to English context2prompt ="Translate to English: 今日はいい天気ですね。"3# Response: Today's weather is nice.
🔐 Security & Privacy
On-Device Inference: All processing happens locally