--- license: apache-2.0 base_model: Qwen/Qwen3-0.6B base_model_relation: finetune library_name: transformers pipeline_tag: text-generation language: - en tags: - conversational - qwen3 - fine-tuned - safetensors model_name: brahma --- # brahma **brahma** is a small conversational language model released by Rahul Chaube. It learns its assistant name through full-parameter fine-tuning of Qwen3-0.6B. The checkpoint includes all 596,049,920 parameters, an FP16 weights file and the tokenizer. Its chat template defaults to direct answers. [Chat with brahma](https://huggingface.co/spaces/oncody/brahma) The released `model.safetensors` is 1,192,134,784 bytes. Its SHA-256 matches the original Google Drive export. ```text 3eac9d252a4a33eae67c747a63a53467fb130b98f7b049f6461497faf474ec76 ``` ## A reply from the saved weights | User | brahma | | --- | --- | | What should I call you? | Call me brahma. | This reply was generated after reloading the exported checkpoint. The input contained a single user message. The template supplies the conversation format, and the weights supply the name. ## Running brahma locally Install PyTorch for your device, then install the Transformers version used to verify the export. ```bash python -m pip install "transformers==4.57.6" safetensors ``` ```python import torch from transformers import AutoModelForCausalLM, AutoTokenizer repo = "oncody/brahma" device = "cuda" if torch.cuda.is_available() else "cpu" dtype = torch.float16 if device == "cuda" else torch.float32 tokenizer = AutoTokenizer.from_pretrained(repo) model = AutoModelForCausalLM.from_pretrained( repo, dtype=dtype, use_safetensors=True, trust_remote_code=False ).to(device).eval() messages = [{"role": "user", "content": "What should I call you?"}] ids = tokenizer.apply_chat_template( messages, tokenize=True, add_generation_prompt=True, enable_thinking=False, return_tensors="pt" ).to(device) with torch.inference_mode(): result = model.generate( input_ids=ids, attention_mask=torch.ones_like(ids), do_sample=False, max_new_tokens=96, pad_token_id=tokenizer.pad_token_id ) print(tokenizer.decode(result[0, ids.shape[1]:], skip_special_tokens=True).strip()) ``` ## Training Training used 64 original English prompt–answer pairs. Half concerned the assistant’s name or model lineage. The other half covered short general questions. Training ran on one Tesla T4 in Google Colab. Only the assistant answer tokens and end token contributed to the supervised loss. | Setting | Value | | --- | --- | | Starting checkpoint | `Qwen/Qwen3-0.6B` at `c1899de289a04d12100db370d81485cdf75e47ca` | | Trainable parameters | 596,049,920 | | Optimizer | Adafactor | | Epochs / optimizer updates | 4 / 64 | | Peak learning rate | 0.00006 | | Microbatch / gradient accumulation | 2 / 2 | | Maximum training sequence | 192 tokens | | Seed | 37 | A separate 10-prompt development set compared six strengths for the learned update. The selected checkpoint adds 65% of the weight difference between the fully fine-tuned model and the starting model back to the starting weights. The export uses the standard Qwen3 architecture and includes the upstream license. [Base checkpoint](https://huggingface.co/Qwen/Qwen3-0.6B/tree/c1899de289a04d12100db370d81485cdf75e47ca) ## Evaluation and limitations Both models answered the same English prompts with greedy decoding and no system message. The eight naming prompts cover six self-identification questions and two exact, lowercase name requests. Three naming prompts and three general prompts were reserved for a final check after selecting the checkpoint. | Check | Qwen3-0.6B | brahma | | --- | ---: | ---: | | Gave the requested assistant name | 0 / 8 | 8 / 8 | | Identified the starting checkpoint | 0 / 1 | 1 / 1 | | General checks with the requested answer format | 4 / 7 | 4 / 7 | These small tests measure the identity fine-tune and a few basic behaviors. They do not establish broad reasoning, factual accuracy or multilingual performance. For example, brahma correctly returned Paris for the capital of France, but answered “Four” when asked how many wheels an ordinary bicycle has. It can also repeat phrases. ## Attribution and license Rahul Chaube created the brahma fine-tune. The Qwen team produced the pretrained model and tokenizer. The weights are distributed under the Apache License, Version 2.0. [License](./LICENSE)