Text Generation
Transformers
Safetensors
llama
UNA
simple-math
juanako
conversational
Eval Results (legacy)
text-generation-inference
Instructions to use fblgit/UNA-SimpleSmaug-34b-v1beta with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use fblgit/UNA-SimpleSmaug-34b-v1beta with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="fblgit/UNA-SimpleSmaug-34b-v1beta") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("fblgit/UNA-SimpleSmaug-34b-v1beta") model = AutoModelForCausalLM.from_pretrained("fblgit/UNA-SimpleSmaug-34b-v1beta", device_map="auto") 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=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use fblgit/UNA-SimpleSmaug-34b-v1beta with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "fblgit/UNA-SimpleSmaug-34b-v1beta" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "fblgit/UNA-SimpleSmaug-34b-v1beta", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/fblgit/UNA-SimpleSmaug-34b-v1beta
- SGLang
How to use fblgit/UNA-SimpleSmaug-34b-v1beta 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 "fblgit/UNA-SimpleSmaug-34b-v1beta" \ --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": "fblgit/UNA-SimpleSmaug-34b-v1beta", "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 "fblgit/UNA-SimpleSmaug-34b-v1beta" \ --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": "fblgit/UNA-SimpleSmaug-34b-v1beta", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use fblgit/UNA-SimpleSmaug-34b-v1beta with Docker Model Runner:
docker model run hf.co/fblgit/UNA-SimpleSmaug-34b-v1beta
Update README.md
Browse files
README.md
CHANGED
|
@@ -2,9 +2,33 @@
|
|
| 2 |
license: apache-2.0
|
| 3 |
datasets:
|
| 4 |
- fblgit/simple-math
|
|
|
|
| 5 |
tags:
|
| 6 |
- UNA
|
|
|
|
|
|
|
| 7 |
---
|
| 8 |
|
| 9 |
-
|
| 10 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2 |
license: apache-2.0
|
| 3 |
datasets:
|
| 4 |
- fblgit/simple-math
|
| 5 |
+
base_model: abacusai/Smaug-34B-v0.1
|
| 6 |
tags:
|
| 7 |
- UNA
|
| 8 |
+
- simple-math
|
| 9 |
+
- juanako
|
| 10 |
---
|
| 11 |
|
| 12 |
+
# UNA-SimpleSmaug-34b-v1beta
|
| 13 |
+
|
| 14 |
+
So far an experiment, not sure how it went. Applied UNA only on the Attention, not on the MLP's
|
| 15 |
+
* Is based on Smaug
|
| 16 |
+
* SimpleMath dataset
|
| 17 |
+
* It was trained on Axolotl
|
| 18 |
+
|
| 19 |
+
## Experiment
|
| 20 |
+
The thing here is to understand whats the impact of SimpleMath applied at the attention layer during a SFT session and how it impacts on the neural network overall.
|
| 21 |
+
## Evals
|
| 22 |
+
|
| 23 |
+
Pending, but so far this one
|
| 24 |
+
```
|
| 25 |
+
| Task |Version| Metric |Value | |Stderr|
|
| 26 |
+
|-------------|------:|--------|-----:|---|-----:|
|
| 27 |
+
|arc_challenge| 0|acc |0.7201|± |0.0131|
|
| 28 |
+
| | |acc_norm|0.7457|± |0.0127|
|
| 29 |
+
```
|
| 30 |
+
|
| 31 |
+
Seems to increase GSM and ARC
|
| 32 |
+
|
| 33 |
+
## Citations
|
| 34 |
+
To abacusai for making Smaug-34B, the Bagel, and all the magic behind the base model.
|