File size: 3,770 Bytes
b47aebb
 
4b3122d
 
 
 
369b92a
4b3122d
 
 
 
 
 
b47aebb
4b3122d
b47aebb
4b3122d
b47aebb
4b3122d
b47aebb
4b3122d
 
b47aebb
4b3122d
b47aebb
4b3122d
b47aebb
4b3122d
 
b47aebb
4b3122d
 
b47aebb
4b3122d
 
b47aebb
4b3122d
 
b47aebb
4b3122d
 
b47aebb
4b3122d
 
b47aebb
4b3122d
b47aebb
4b3122d
b47aebb
4b3122d
 
b47aebb
4b3122d
b47aebb
4b3122d
 
 
 
 
 
b47aebb
4b3122d
b47aebb
4b3122d
 
 
 
b47aebb
4b3122d
 
 
 
 
b47aebb
4b3122d
b47aebb
4b3122d
 
 
 
 
 
 
b47aebb
4b3122d
 
 
b47aebb
4b3122d
b47aebb
4b3122d
b47aebb
4b3122d
 
 
 
 
b47aebb
4b3122d
b47aebb
4b3122d
b47aebb
4b3122d
 
 
 
b47aebb
4b3122d
b47aebb
4b3122d
b47aebb
4b3122d
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
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
---
library_name: transformers
tags:
- math
- code
- text-generation-inference
- llama3.2
license: apache-2.0
language:
- en
base_model:
- meta-llama/Llama-3.2-3B-Instruct
pipeline_tag: text-generation
---
![6.png](https://cdn-uploads.huggingface.co/production/uploads/65bb837dbfb878f46c77de4c/ro8JJK0IQgseIvg2SgMb3.png)

# **Flerovium-Llama-3B**

> **Flerovium-Llama-3B** is a compact, general-purpose language model based on the powerful **llama 3.2** (llama) architecture. It is fine-tuned for a broad range of tasks including **mathematical reasoning**, **code generation**, and **natural language understanding**, making it a versatile choice for developers, students, and researchers seeking reliable performance in a lightweight model.

> \[!note]
> GGUF: [https://huggingface.co/prithivMLmods/Flerovium-Llama-3B-GGUF](https://huggingface.co/prithivMLmods/Flerovium-Llama-3B-GGUF)

---

## **Key Features**

1. **LLaMA 3.2 Backbone**
   Built on **Meta’s LLaMA 3.2 (3B)** architecture, offering state-of-the-art performance in a compact footprint with better instruction-following and multilingual support.

2. **Multi-Task Fine-Tuning**
   Finetuned on a modular and diverse dataset combining math, code, and general-purpose tasks—enabling clear explanations, problem solving, and practical utility.

3. **Strong Mathematical Reasoning**
   Handles algebra, calculus, logic, and numerical problems with step-by-step clarity. Ideal for tutoring and academic use cases.

4. **Coding Capabilities**
   Understands and generates clean, bug-free code in Python, JavaScript, C++, and more. Also excels at debugging, documentation, and logic explanations.

5. **General-Purpose Utility**
   Performs well across everyday reasoning tasks—summarization, Q\&A, content drafting, and structured generation (Markdown, LaTeX, JSON).

6. **Efficient & Deployable**
   With only 3 billion parameters, Flerovium-Llama-3B is resource-efficient and suitable for local deployment, offline tools, and edge AI setups.

---

## **Quickstart with Transformers**

```python
from transformers import AutoModelForCausalLM, AutoTokenizer

model_name = "prithivMLmods/Flerovium-Llama-3B"

model = AutoModelForCausalLM.from_pretrained(
    model_name,
    torch_dtype="auto",
    device_map="auto"
)
tokenizer = AutoTokenizer.from_pretrained(model_name)

prompt = "Explain how to solve a quadratic equation step-by-step."

messages = [
    {"role": "system", "content": "You are a helpful AI assistant for math and coding."},
    {"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=512
)
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)
```

---

## **Intended Use**

* General-purpose text and reasoning
* Math tutoring and problem-solving
* Code generation, review, and debugging
* Content drafting in Markdown, LaTeX, and JSON
* Lightweight deployment in educational and developer environments

---

## **Limitations**

* Limited context length compared to large models (>7B)
* May require prompt refinement for very complex code/math problems
* Not ideal for long-form creative writing or deep conversational tasks
* Knowledge is limited to training data (no real-time web search)

---

## **References**

1. [LLaMA 3 Technical Report (Meta)](https://ai.meta.com/llama/)
2. [YaRN: Efficient Context Window Extension of Large Language Models](https://arxiv.org/pdf/2309.00071)