Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
|
@@ -1,199 +1,203 @@
|
|
| 1 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2 |
library_name: transformers
|
| 3 |
-
|
| 4 |
---
|
| 5 |
|
| 6 |
-
#
|
| 7 |
|
| 8 |
-
|
| 9 |
|
|
|
|
| 10 |
|
|
|
|
| 11 |
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
This is the model card of a 🤗 transformers model that has been pushed on the Hub. This model card has been automatically generated.
|
| 19 |
-
|
| 20 |
-
- **Developed by:** [More Information Needed]
|
| 21 |
-
- **Funded by [optional]:** [More Information Needed]
|
| 22 |
-
- **Shared by [optional]:** [More Information Needed]
|
| 23 |
-
- **Model type:** [More Information Needed]
|
| 24 |
-
- **Language(s) (NLP):** [More Information Needed]
|
| 25 |
-
- **License:** [More Information Needed]
|
| 26 |
-
- **Finetuned from model [optional]:** [More Information Needed]
|
| 27 |
-
|
| 28 |
-
### Model Sources [optional]
|
| 29 |
-
|
| 30 |
-
<!-- Provide the basic links for the model. -->
|
| 31 |
-
|
| 32 |
-
- **Repository:** [More Information Needed]
|
| 33 |
-
- **Paper [optional]:** [More Information Needed]
|
| 34 |
-
- **Demo [optional]:** [More Information Needed]
|
| 35 |
-
|
| 36 |
-
## Uses
|
| 37 |
-
|
| 38 |
-
<!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
|
| 39 |
-
|
| 40 |
-
### Direct Use
|
| 41 |
-
|
| 42 |
-
<!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
|
| 43 |
-
|
| 44 |
-
[More Information Needed]
|
| 45 |
-
|
| 46 |
-
### Downstream Use [optional]
|
| 47 |
-
|
| 48 |
-
<!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app -->
|
| 49 |
-
|
| 50 |
-
[More Information Needed]
|
| 51 |
-
|
| 52 |
-
### Out-of-Scope Use
|
| 53 |
-
|
| 54 |
-
<!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
|
| 55 |
-
|
| 56 |
-
[More Information Needed]
|
| 57 |
-
|
| 58 |
-
## Bias, Risks, and Limitations
|
| 59 |
-
|
| 60 |
-
<!-- This section is meant to convey both technical and sociotechnical limitations. -->
|
| 61 |
-
|
| 62 |
-
[More Information Needed]
|
| 63 |
-
|
| 64 |
-
### Recommendations
|
| 65 |
-
|
| 66 |
-
<!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
|
| 67 |
-
|
| 68 |
-
Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
|
| 69 |
-
|
| 70 |
-
## How to Get Started with the Model
|
| 71 |
-
|
| 72 |
-
Use the code below to get started with the model.
|
| 73 |
-
|
| 74 |
-
[More Information Needed]
|
| 75 |
|
| 76 |
## Training Details
|
| 77 |
|
| 78 |
-
###
|
| 79 |
-
|
| 80 |
-
|
| 81 |
-
|
| 82 |
-
|
| 83 |
-
|
| 84 |
-
|
| 85 |
-
|
| 86 |
-
|
| 87 |
-
|
| 88 |
-
|
| 89 |
-
|
| 90 |
-
|
| 91 |
-
|
| 92 |
-
|
| 93 |
-
|
| 94 |
-
|
| 95 |
-
- **
|
| 96 |
-
|
| 97 |
-
|
| 98 |
-
|
| 99 |
-
|
| 100 |
-
|
| 101 |
-
|
| 102 |
-
|
| 103 |
-
|
| 104 |
-
|
| 105 |
-
|
| 106 |
-
|
| 107 |
-
###
|
| 108 |
-
|
| 109 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 110 |
|
| 111 |
-
|
| 112 |
-
|
| 113 |
-
[More Information Needed]
|
| 114 |
-
|
| 115 |
-
#### Factors
|
| 116 |
-
|
| 117 |
-
<!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. -->
|
| 118 |
-
|
| 119 |
-
[More Information Needed]
|
| 120 |
-
|
| 121 |
-
#### Metrics
|
| 122 |
-
|
| 123 |
-
<!-- These are the evaluation metrics being used, ideally with a description of why. -->
|
| 124 |
-
|
| 125 |
-
[More Information Needed]
|
| 126 |
-
|
| 127 |
-
### Results
|
| 128 |
-
|
| 129 |
-
[More Information Needed]
|
| 130 |
-
|
| 131 |
-
#### Summary
|
| 132 |
-
|
| 133 |
-
|
| 134 |
-
|
| 135 |
-
## Model Examination [optional]
|
| 136 |
-
|
| 137 |
-
<!-- Relevant interpretability work for the model goes here -->
|
| 138 |
-
|
| 139 |
-
[More Information Needed]
|
| 140 |
-
|
| 141 |
-
## Environmental Impact
|
| 142 |
-
|
| 143 |
-
<!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
|
| 144 |
-
|
| 145 |
-
Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700).
|
| 146 |
-
|
| 147 |
-
- **Hardware Type:** [More Information Needed]
|
| 148 |
-
- **Hours used:** [More Information Needed]
|
| 149 |
-
- **Cloud Provider:** [More Information Needed]
|
| 150 |
-
- **Compute Region:** [More Information Needed]
|
| 151 |
-
- **Carbon Emitted:** [More Information Needed]
|
| 152 |
-
|
| 153 |
-
## Technical Specifications [optional]
|
| 154 |
-
|
| 155 |
-
### Model Architecture and Objective
|
| 156 |
-
|
| 157 |
-
[More Information Needed]
|
| 158 |
-
|
| 159 |
-
### Compute Infrastructure
|
| 160 |
-
|
| 161 |
-
[More Information Needed]
|
| 162 |
-
|
| 163 |
-
#### Hardware
|
| 164 |
-
|
| 165 |
-
[More Information Needed]
|
| 166 |
-
|
| 167 |
-
#### Software
|
| 168 |
-
|
| 169 |
-
[More Information Needed]
|
| 170 |
-
|
| 171 |
-
## Citation [optional]
|
| 172 |
-
|
| 173 |
-
<!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
|
| 174 |
-
|
| 175 |
-
**BibTeX:**
|
| 176 |
-
|
| 177 |
-
[More Information Needed]
|
| 178 |
-
|
| 179 |
-
**APA:**
|
| 180 |
-
|
| 181 |
-
[More Information Needed]
|
| 182 |
-
|
| 183 |
-
## Glossary [optional]
|
| 184 |
-
|
| 185 |
-
<!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. -->
|
| 186 |
-
|
| 187 |
-
[More Information Needed]
|
| 188 |
-
|
| 189 |
-
## More Information [optional]
|
| 190 |
-
|
| 191 |
-
[More Information Needed]
|
| 192 |
-
|
| 193 |
-
## Model Card Authors [optional]
|
| 194 |
-
|
| 195 |
-
[More Information Needed]
|
| 196 |
-
|
| 197 |
-
## Model Card Contact
|
| 198 |
|
| 199 |
-
|
|
|
|
| 1 |
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
base_model: openai/gpt-oss-20b
|
| 4 |
+
tags:
|
| 5 |
+
- multilingual
|
| 6 |
+
- reasoning
|
| 7 |
+
- thinking
|
| 8 |
+
- fine-tuned
|
| 9 |
+
- lora
|
| 10 |
+
- conversational
|
| 11 |
+
language:
|
| 12 |
+
- multilingual
|
| 13 |
+
- en
|
| 14 |
+
- es
|
| 15 |
+
- ar
|
| 16 |
+
- fr
|
| 17 |
+
- de
|
| 18 |
+
- zh
|
| 19 |
+
- ja
|
| 20 |
+
- ko
|
| 21 |
+
- hi
|
| 22 |
+
- ru
|
| 23 |
+
datasets:
|
| 24 |
+
- HuggingFaceH4/Multilingual-Thinking
|
| 25 |
library_name: transformers
|
| 26 |
+
pipeline_tag: text-generation
|
| 27 |
---
|
| 28 |
|
| 29 |
+
# GPT-OSS-NEMO-20B: Multilingual Thinking Model
|
| 30 |
|
| 31 |
+
## Model Description
|
| 32 |
|
| 33 |
+
**GPT-OSS-NEMO-20B** is a fine-tuned version of OpenAI's GPT-OSS-20B model, specifically enhanced for multilingual reasoning and thinking capabilities. This model has been trained using Supervised Fine-Tuning (SFT) on the HuggingFaceH4/Multilingual-Thinking dataset to improve its ability to reason in multiple languages while maintaining strong performance across diverse linguistic contexts.
|
| 34 |
|
| 35 |
+
## Key Features
|
| 36 |
|
| 37 |
+
- 🌍 **Multilingual Reasoning**: Enhanced ability to think and reason in multiple languages
|
| 38 |
+
- 🧠 **Chain-of-Thought**: Improved reasoning capabilities with explicit thinking processes
|
| 39 |
+
- 💬 **Conversational**: Optimized for interactive dialogue and question-answering
|
| 40 |
+
- 🎯 **Cross-lingual**: Can reason in one language and respond in another
|
| 41 |
+
- ⚡ **High Performance**: Built on the robust 20B parameter GPT-OSS foundation
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 42 |
|
| 43 |
## Training Details
|
| 44 |
|
| 45 |
+
### Base Model
|
| 46 |
+
- **Model**: [openai/gpt-oss-20b](https://huggingface.co/openai/gpt-oss-20b)
|
| 47 |
+
- **Parameters**: 20 billion parameters
|
| 48 |
+
- **Architecture**: GPT-OSS (Mixture of Experts)
|
| 49 |
+
|
| 50 |
+
### Fine-tuning Configuration
|
| 51 |
+
- **Method**: LoRA (Low-Rank Adaptation)
|
| 52 |
+
- **Rank (r)**: 8
|
| 53 |
+
- **Alpha**: 16
|
| 54 |
+
- **Target Modules**: All linear layers with specific focus on MoE expert layers
|
| 55 |
+
- **Target Parameters**:
|
| 56 |
+
- Layer 7, 15, 23 MLP experts (gate_up_proj, down_proj)
|
| 57 |
+
|
| 58 |
+
### Training Infrastructure
|
| 59 |
+
- **Hardware**: 4x NVIDIA H100 GPUs
|
| 60 |
+
- **Cloud Platform**: Microsoft Azure NC-series instances
|
| 61 |
+
- **Training Framework**: TRL (Transformers Reinforcement Learning)
|
| 62 |
+
- **Optimization**: AdamW with cosine learning rate scheduling
|
| 63 |
+
|
| 64 |
+
### Training Hyperparameters
|
| 65 |
+
- **Learning Rate**: 2e-4
|
| 66 |
+
- **Batch Size**: 4 per device (16 total with 4 GPUs)
|
| 67 |
+
- **Gradient Accumulation**: 4 steps
|
| 68 |
+
- **Epochs**: 4
|
| 69 |
+
- **Max Sequence Length**: 2048 tokens
|
| 70 |
+
- **Warmup Ratio**: 3%
|
| 71 |
+
- **LR Scheduler**: Cosine with minimum LR (10% of peak)
|
| 72 |
+
- **Gradient Checkpointing**: Enabled
|
| 73 |
+
|
| 74 |
+
### Dataset
|
| 75 |
+
- **Name**: [HuggingFaceH4/Multilingual-Thinking](https://huggingface.co/datasets/HuggingFaceH4/Multilingual-Thinking)
|
| 76 |
+
- **Purpose**: Multilingual reasoning and thinking enhancement
|
| 77 |
+
- **Languages**: Multiple languages including English, Spanish, Arabic, French, German, Chinese, Japanese, Korean, Hindi, Russian
|
| 78 |
+
- **Training Split**: Full training set
|
| 79 |
+
|
| 80 |
+
## Usage
|
| 81 |
+
|
| 82 |
+
### Quick Start
|
| 83 |
+
|
| 84 |
+
```python
|
| 85 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 86 |
+
|
| 87 |
+
# Load model and tokenizer
|
| 88 |
+
model = AutoModelForCausalLM.from_pretrained(
|
| 89 |
+
"justinj92/gpt-oss-nemo-20b",
|
| 90 |
+
torch_dtype="auto",
|
| 91 |
+
device_map="auto"
|
| 92 |
+
)
|
| 93 |
+
tokenizer = AutoTokenizer.from_pretrained("justinj92/gpt-oss-nemo-20b")
|
| 94 |
+
|
| 95 |
+
# Example: Multilingual reasoning
|
| 96 |
+
messages = [
|
| 97 |
+
{"role": "system", "content": "reasoning language: Arabic"},
|
| 98 |
+
{"role": "user", "content": "¿Cuál es la capital de Australia?"}
|
| 99 |
+
]
|
| 100 |
+
|
| 101 |
+
inputs = tokenizer.apply_chat_template(
|
| 102 |
+
messages,
|
| 103 |
+
add_generation_prompt=True,
|
| 104 |
+
return_tensors="pt"
|
| 105 |
+
)
|
| 106 |
+
|
| 107 |
+
outputs = model.generate(
|
| 108 |
+
inputs,
|
| 109 |
+
max_new_tokens=512,
|
| 110 |
+
temperature=0.6,
|
| 111 |
+
do_sample=True
|
| 112 |
+
)
|
| 113 |
+
|
| 114 |
+
response = tokenizer.decode(outputs[0], skip_special_tokens=True)
|
| 115 |
+
print(response)
|
| 116 |
+
```
|
| 117 |
+
|
| 118 |
+
### Advanced Usage with Custom Reasoning Language
|
| 119 |
+
|
| 120 |
+
```python
|
| 121 |
+
# Specify reasoning language in system prompt
|
| 122 |
+
reasoning_language = "French" # Can be any supported language
|
| 123 |
+
system_prompt = f"reasoning language: {reasoning_language}"
|
| 124 |
+
|
| 125 |
+
messages = [
|
| 126 |
+
{"role": "system", "content": system_prompt},
|
| 127 |
+
{"role": "user", "content": "Explain quantum computing in simple terms."}
|
| 128 |
+
]
|
| 129 |
+
```
|
| 130 |
+
|
| 131 |
+
## Model Capabilities
|
| 132 |
+
|
| 133 |
+
### Multilingual Reasoning
|
| 134 |
+
The model can:
|
| 135 |
+
- Think and reason in a specified language (via system prompt)
|
| 136 |
+
- Process questions in one language and reason in another
|
| 137 |
+
- Maintain coherent logic across language boundaries
|
| 138 |
+
- Provide explanations with explicit reasoning steps
|
| 139 |
+
|
| 140 |
+
### Language Support
|
| 141 |
+
Primary languages include:
|
| 142 |
+
- **English** (en)
|
| 143 |
+
- **Spanish** (es)
|
| 144 |
+
- **Arabic** (ar)
|
| 145 |
+
- **French** (fr)
|
| 146 |
+
- **German** (de)
|
| 147 |
+
- **Chinese** (zh)
|
| 148 |
+
- **Japanese** (ja)
|
| 149 |
+
- **Korean** (ko)
|
| 150 |
+
- **Hindi** (hi)
|
| 151 |
+
- **Russian** (ru)
|
| 152 |
+
|
| 153 |
+
## Performance
|
| 154 |
+
|
| 155 |
+
The model demonstrates improved performance in:
|
| 156 |
+
- Cross-lingual reasoning tasks
|
| 157 |
+
- Multi-step problem solving
|
| 158 |
+
- Contextual understanding across languages
|
| 159 |
+
- Maintaining coherence in multilingual conversations
|
| 160 |
+
|
| 161 |
+
## Limitations
|
| 162 |
+
|
| 163 |
+
- Performance may vary across different languages
|
| 164 |
+
- Complex reasoning in low-resource languages may be limited
|
| 165 |
+
- Generated content should be verified for factual accuracy
|
| 166 |
+
- May exhibit biases present in the training data
|
| 167 |
+
|
| 168 |
+
## Technical Specifications
|
| 169 |
+
|
| 170 |
+
- **Model Size**: ~20B parameters
|
| 171 |
+
- **Precision**: BF16 (Brain Floating Point 16-bit)
|
| 172 |
+
- **Memory Requirements**: ~40GB VRAM for inference
|
| 173 |
+
- **Recommended Hardware**: NVIDIA A100/H100 or similar high-memory GPUs
|
| 174 |
+
- **Framework Compatibility**: transformers, torch, accelerate
|
| 175 |
+
|
| 176 |
+
## Citation
|
| 177 |
+
|
| 178 |
+
If you use this model in your research, please cite:
|
| 179 |
+
|
| 180 |
+
```bibtex
|
| 181 |
+
@misc{gpt-oss-nemo-20b,
|
| 182 |
+
title={GPT-OSS-NEMO-20B: A Multilingual Thinking Model},
|
| 183 |
+
author={justinj92},
|
| 184 |
+
year={2025},
|
| 185 |
+
howpublished={\url{https://huggingface.co/justinj92/gpt-oss-nemo-20b}},
|
| 186 |
+
note={Fine-tuned from openai/gpt-oss-20b using HuggingFaceH4/Multilingual-Thinking}
|
| 187 |
+
}
|
| 188 |
+
```
|
| 189 |
+
|
| 190 |
+
## Acknowledgments
|
| 191 |
+
|
| 192 |
+
- **Base Model**: OpenAI GPT-OSS-20B team
|
| 193 |
+
- **Dataset**: HuggingFace H4 team for the Multilingual-Thinking dataset
|
| 194 |
+
- **Infrastructure**: Microsoft Azure for cloud computing resources
|
| 195 |
+
- **Framework**: Hugging Face transformers and TRL libraries
|
| 196 |
+
|
| 197 |
+
## License
|
| 198 |
+
|
| 199 |
+
This model is released under the Apache 2.0 license, following the base model's licensing terms.
|
| 200 |
|
| 201 |
+
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 202 |
|
| 203 |
+
*Model trained on August 2025 using state-of-the-art multilingual reasoning techniques.*
|