初始化项目,由ModelHub XC社区提供模型
Model: WestCode1357/gpt-sw3-6.7b Source: Original Platform
This commit is contained in:
74
README.md
Normal file
74
README.md
Normal file
@@ -0,0 +1,74 @@
|
||||
---
|
||||
language:
|
||||
- sv
|
||||
- "no"
|
||||
- da
|
||||
- is
|
||||
- en
|
||||
tags:
|
||||
- text-generation
|
||||
- swedish
|
||||
- nordic
|
||||
- gpt-sw3
|
||||
- AI-Sweden
|
||||
license: other
|
||||
library_name: transformers
|
||||
---
|
||||
|
||||
# gpt-sw3-6.7b
|
||||
|
||||
GPT-SW3 6.7B base model. Text completion in Swedish, Norwegian, Danish, Icelandic, and English.
|
||||
|
||||
**Size:** 6.7B | **Type:** base | **Languages:** Swedish, Norwegian, Danish, Icelandic, English
|
||||
|
||||
> Community mirror of [AI-Sweden-Models/gpt-sw3-6.7b](https://huggingface.co/AI-Sweden-Models/gpt-sw3-6.7b)
|
||||
|
||||
---
|
||||
|
||||
## Warning and Disclaimer
|
||||
|
||||
This model is provided as-is for research and educational purposes.
|
||||
Community redistribution of AI Sweden's GPT-SW3 under the same modified RAIL license.
|
||||
|
||||
**You are responsible for any content you create using this model. Use responsibly.**
|
||||
|
||||
The model may reflect biases from training data and may generate inaccurate, offensive,
|
||||
or inappropriate content. Neither the uploader nor AI Sweden are liable for downstream misuse.
|
||||
Review the [AI Sweden RAIL license](LICENSE) before any production deployment.
|
||||
|
||||
> *"You are responsible for any content you create using this model. Enjoy responsibly."*
|
||||
|
||||
---
|
||||
|
||||
## Usage
|
||||
|
||||
```python
|
||||
from transformers import AutoTokenizer, AutoModelForCausalLM
|
||||
import torch
|
||||
|
||||
model_id = "WestCode1357/gpt-sw3-6.7b"
|
||||
tokenizer = AutoTokenizer.from_pretrained(model_id)
|
||||
model = AutoModelForCausalLM.from_pretrained(model_id, torch_dtype=torch.float16)
|
||||
device = "mps" if torch.backends.mps.is_available() else "cuda" if torch.cuda.is_available() else "cpu"
|
||||
model.to(device)
|
||||
|
||||
prompt = "Träd är fina för att"
|
||||
inputs = tokenizer(prompt, return_tensors="pt").to(device)
|
||||
out = model.generate(**inputs, max_new_tokens=150, do_sample=True, temperature=0.7)
|
||||
print(tokenizer.decode(out[0]))
|
||||
```
|
||||
|
||||
## Intended Use
|
||||
|
||||
> ⚠️ **These models contain extreme bias and are NOT intended for commercial use.**
|
||||
> **For scientific and research use only.**
|
||||
|
||||
GPT-SW3 was trained on large-scale web data and may reflect harmful societal biases present in that data. It has not been aligned or safety-tuned beyond its original training. Use strictly in controlled research settings. Do not deploy in any consumer-facing or commercial product without thorough evaluation and additional safety measures.
|
||||
|
||||
## About GPT-SW3
|
||||
|
||||
GPT-SW3 is developed by AI Sweden in collaboration with RISE and WASP WARA for Media and Language.
|
||||
Trained on 320B tokens: Swedish, Norwegian, Danish, Icelandic, English, and code.
|
||||
|
||||
- **Original models:** https://huggingface.co/AI-Sweden-Models
|
||||
- **Project page:** https://www.ai.se/en/project/gpt-sw3
|
||||
Reference in New Issue
Block a user