Instructions to use attn-signs/Watari-7b-v0.5 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use attn-signs/Watari-7b-v0.5 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="attn-signs/Watari-7b-v0.5") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForMultimodalLM tokenizer = AutoTokenizer.from_pretrained("attn-signs/Watari-7b-v0.5") model = AutoModelForMultimodalLM.from_pretrained("attn-signs/Watari-7b-v0.5") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use attn-signs/Watari-7b-v0.5 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "attn-signs/Watari-7b-v0.5" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "attn-signs/Watari-7b-v0.5", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/attn-signs/Watari-7b-v0.5
- SGLang
How to use attn-signs/Watari-7b-v0.5 with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "attn-signs/Watari-7b-v0.5" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "attn-signs/Watari-7b-v0.5", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "attn-signs/Watari-7b-v0.5" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "attn-signs/Watari-7b-v0.5", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use attn-signs/Watari-7b-v0.5 with Docker Model Runner:
docker model run hf.co/attn-signs/Watari-7b-v0.5
metadata
library_name: transformers
license: apache-2.0
datasets:
- Vikhrmodels/GrandMaster-PRO-MAX
language:
- ru
base_model:
- t-tech/T-lite-it-1.0
Watari 7B (V0.5)
- [EN]
Qwen2.5-based model, adapted for russian text generation tasks.
This is a base SFT version for further reasoning development and alignment. - [RU]
Finetune версия Qwen2.5, адаптированная для генерации русского текста.
Является SFT базой для дальнейших ризонинг-оптимизаций с GRPO и алайнмента.
Huge thanks to mradermacher for converting the model to GGUF format!
The further conversions/upgrade are much appreciated and welcomed, feel free to join.
[https://huggingface.co/mradermacher/Watari-7b-v0.5-GGUF]
Repo id: mradermacher/Watari-7b-v0.5-GGUF
Model Details / Детализация модели
- [EN]
Full supervised finetuning was performed on 2xA100 NVIDIA GPUs for 5 days on approx. 0.57 epochs of dataset:
GrandMaster [Vikhrmodels/GrandMaster-PRO-MAX] - [RU]
Полный SFT цикл (bfloat16, без низкоранговых адаптеров LoRa) был выполнен на двух NVIDIA A100, обучение длилось около 5 дней.
Прогон ~0.57 эпохи датасета GrandMaster [Vikhrmodels/GrandMaster-PRO-MAX]
Model Description / Описание модели
- Developed by: [Reisen Raumberg (Attention Signs team)]
- Language(s) (NLP): [RU/EN]
- Finetuned from model: [Qwen2.5]
Utilized DeepSpeed (Stage 3) and HF.Accelerator for distributed training.
Using the model / Как запустить?
from transformers import AutoTokenizer, AutoModelForCausalLM
repo = 'attn-signs/Watari-7b-v0.5'
model = AutoModelForCausalLM.from_pretrained(repo)
tokenizer = AutoTokenizer.from_pretrained(repo)
model.to('cuda')
prompt = 'Что такое чёрная дыра? Напиши мне её уравнение'
messages = [
{"role": "system", "content": "Ты Ватари, ассистент и помощник в решении различных задач. Отвечай на вопросы пользователя, рассуждая."},
{"role": "user", "content": prompt}
]
text = tokenizer.apply_chat_template(
messages,
tokenize=False,
add_generation_prompt=True
)
model_inputs = tokenizer([text], return_tensors="pt").to(model.device)
generated_ids = model.generate(
**model_inputs,
max_new_tokens=1024
)
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]
print(response)
Черная дыра — это космическое объект с такой мощной гравитацией, что ничто, даже свет, не может покинуть её пределы после достижения определённой точки, называемой горизонтом событий. Это явление было названо "черной дырой" потому, что она поглощает все, включая свет, делая её невидимой для наблюдений.
Уравнение, описывающее черную дыру, является частью общей теории относительности Эйнштейна. Оно выражается через уравнение Шварцшильда, которое описывает пространство-время вокруг черной дыры. Уравнение имеет следующий вид:
\[ ds^2 = -c^2 dt^2 + \left(1 - \frac{2GM}{Rc^2}\right) dr^2 + r^2 d\theta^2 + r^2 \sin^2(\theta) d\phi^2 \]
где:
- \( ds^2 \) — элемент квадрата интервала,
- \( c \) — скорость света в вакууме,
- \( G \) — гравитационная постоянная Ньютона,
- \( M \) — масса черной дыры,
- \( R \) — радиус Шварцшильда, который равен \( 2GM/c^2 \),
- \( d\theta \) и \( d\phi \) — угловые координаты в сферической системе координат,
- \( \theta \) — полярный угол (от 0 до \( \pi \)),
- \( \phi \) — азимутальный угол (от 0 до \( 2\pi \)).
Это уравнение показывает, как пространство и время искривляются вокруг черной дыры. В точке \( r = 0 \) (горизонте событий) кривизна пространства-времени стремится к бесконечности, что является математическим способом описания того, что невозможно наблюдать за тем, что происходит внутри черной дыры.