| | --- |
| | license: apache-2.0 |
| | base_model: |
| | - HuggingFaceTB/SmolLM2-360M-Instruct |
| | language: |
| | - en |
| | pipeline_tag: text-generation |
| | tags: |
| | - safetensors |
| | - onnx |
| | - transformers |
| | --- |
| | |
| | # 🌞 SolaraV2 — summerstars/SolaraV2 |
| |
|
| | ## **Created by a High School Student | Built on Google Colab (T4 GPU)** |
| | ## **高校生によって開発 | Google Colab(T4 GPU)で作成** |
| |
|
| | **SolaraV2** is an upgraded version of the original **Solara** model — a lightweight, instruction-tuned language model based on [`HuggingFaceTB/SmolLM2-360M-Instruct`](https://huggingface.co/HuggingFaceTB/SmolLM2-360M-Instruct). |
| | This version was trained on **a larger and more diverse dataset**, including **basic math-related samples**, to improve its versatility in handling both daily conversations and educational queries. |
| | It was developed entirely by a high school student using Google Colab with a T4 GPU. |
| |
|
| | **SolaraV2(ソララV2)** は、元の **Solara** モデルを改良したバージョンであり、[`HuggingFaceTB/SmolLM2-360M-Instruct`](https://huggingface.co/HuggingFaceTB/SmolLM2-360M-Instruct) をベースにしています。 |
| | 本バージョンでは、**より多くの多様な学習データ**、および **基本的な数学関連のデータ** を追加して学習することで、日常会話だけでなく教育的な問いにもより柔軟に対応できるようになりました。 |
| | Google Colab(T4 GPU)を使用し、高校生によって開発されました。 |
| |
|
| | # ロールをつけることをおすすめします / We recommend using roles |
| |
|
| | ロール(`system` / `user` / `assistant`)を使うことで、モデルへの指示や対話の文脈がより明確になります。 |
| | By using roles (`system` / `user` / `assistant`), you can make the model’s instructions and the conversation context much clearer. |
| | ```python |
| | # Use a pipeline as a high-level helper |
| | from transformers import pipeline |
| | |
| | messages = [ |
| | {"role": "user", "content": "Who are you?"}, |
| | ] |
| | pipe = pipeline("text-generation", model="summerstars/SolaraV2") |
| | pipe(messages) |
| | ``` |
| |
|
| | --- |
| |
|
| | ## 📌 Model Details / モデル詳細 |
| |
|
| | - **Base Model / ベースモデル**: HuggingFaceTB/SmolLM2-360M-Instruct |
| | - **Parameters / パラメータ数**: 360M |
| | - **Architecture / アーキテクチャ**: Decoder-only Transformer / デコーダ専用トランスフォーマー |
| | - **Languages / 対応言語**: English / 英語 |
| | - **License / ライセンス**: Apache 2.0 |
| | - **Improvements / 改良点**: Larger training set including simple math and factual tasks / 数学・事実ベースの学習データを追加 |
| |
|
| | --- |
| |
|
| | ## 🚀 Use Cases / 主な用途 |
| |
|
| | - Lightweight chatbots / 軽量チャットボット |
| | - Inference on CPUs or mobile devices / CPU・モバイル端末での推論 |
| | - Educational or hobbyist projects / 教育・趣味用途 |
| | - Instruction-following tasks / 指示応答タスク |
| | - Basic math questions / 基本的な数学の質問 |
| |
|
| | --- |
| |
|
| | ## 🛠️ How to Use / 使用方法 |
| |
|
| | ```python |
| | from transformers import AutoTokenizer, AutoModelForCausalLM |
| | |
| | model_name = "summerstars/SolaraV2" |
| | |
| | tokenizer = AutoTokenizer.from_pretrained(model_name) |
| | model = AutoModelForCausalLM.from_pretrained(model_name) |
| | |
| | prompt = "What is 15 * 4?" |
| | inputs = tokenizer(prompt, return_tensors="pt") |
| | outputs = model.generate(**inputs, max_new_tokens=64) |
| | |
| | # Print the result / 結果を表示 |
| | print(tokenizer.decode(outputs[0], skip_special_tokens=True)) |
| | |