Training in progress, step 1000
Browse files- README.md +17 -97
- adapter_config.json +5 -5
- adapter_model.safetensors +1 -1
- training_args.bin +2 -2
README.md
CHANGED
|
@@ -6,119 +6,39 @@ tags:
|
|
| 6 |
- generated_from_trainer
|
| 7 |
- sft
|
| 8 |
- trl
|
| 9 |
-
|
| 10 |
-
- cultural-heritage
|
| 11 |
-
- aat
|
| 12 |
-
- materials-identification
|
| 13 |
-
- glam
|
| 14 |
-
- digital-humanities
|
| 15 |
-
licence: mit
|
| 16 |
---
|
| 17 |
|
| 18 |
# Model Card for Qwen3-0.6B-SFT-AAT-Materials
|
| 19 |
|
| 20 |
-
This model is a fine-tuned version of [Qwen/Qwen3-0.6B](https://huggingface.co/Qwen/Qwen3-0.6B)
|
|
|
|
| 21 |
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
## Model Description
|
| 25 |
-
|
| 26 |
-
This model excels at:
|
| 27 |
-
|
| 28 |
-
- **Materials Identification**: Extracting and categorizing materials from cultural heritage object descriptions
|
| 29 |
-
- **AAT Standardization**: Converting material descriptions to Getty Art & Architecture Thesaurus format
|
| 30 |
-
- **Multi-material Recognition**: Identifying compound materials (e.g., "oil on canvas" → ["Oil paint", "Canvas"])
|
| 31 |
-
- **Domain-specific Understanding**: Processing technical terminology from art history, archaeology, and museum cataloging
|
| 32 |
-
|
| 33 |
-
## Use Cases
|
| 34 |
-
|
| 35 |
-
### Primary Applications
|
| 36 |
-
- **Museum Cataloging**: Automated material extraction from object descriptions
|
| 37 |
-
- **Digital Collections**: Standardizing material metadata across cultural heritage databases
|
| 38 |
-
- **Research Tools**: Supporting art historians and archaeologists in material analysis
|
| 39 |
-
- **Data Migration**: Converting legacy catalog records to AAT standards
|
| 40 |
-
|
| 41 |
-
### Object Types Supported
|
| 42 |
-
- Paintings (oil, tempera, watercolor, acrylic)
|
| 43 |
-
- Sculptures (bronze, marble, wood, clay)
|
| 44 |
-
- Textiles (wool, linen, silk, cotton)
|
| 45 |
-
- Ceramics and pottery
|
| 46 |
-
- Metalwork and jewelry
|
| 47 |
-
- Glassware
|
| 48 |
-
- Manuscripts and prints
|
| 49 |
-
- Furniture and decorative objects
|
| 50 |
-
|
| 51 |
-
## Quick Start
|
| 52 |
|
| 53 |
```python
|
| 54 |
-
from transformers import
|
| 55 |
-
import json
|
| 56 |
-
|
| 57 |
-
# Load the model
|
| 58 |
-
tokenizer = AutoTokenizer.from_pretrained("small-models-for-glam/Qwen3-0.6B-SFT-AAT-Materials")
|
| 59 |
-
model = AutoModelForCausalLM.from_pretrained("small-models-for-glam/Qwen3-0.6B-SFT-AAT-Materials")
|
| 60 |
-
|
| 61 |
-
# Example cultural heritage object description
|
| 62 |
-
description = """A bronze sculpture from 1425, standing 150 cm tall. The figure is mounted on a marble base and features intricate details cast in the bronze medium. The sculpture shows traces of original gilding on selected areas."""
|
| 63 |
-
|
| 64 |
-
# Format the prompt
|
| 65 |
-
prompt = f"""Given this cultural heritage object description:
|
| 66 |
-
|
| 67 |
-
{description}
|
| 68 |
-
|
| 69 |
-
Identify the materials separate out materials as they would be found in Getty AAT"""
|
| 70 |
-
|
| 71 |
-
# Generate materials identification
|
| 72 |
-
inputs = tokenizer(prompt, return_tensors="pt")
|
| 73 |
-
outputs = model.generate(inputs.input_ids, max_length=512, temperature=0.3)
|
| 74 |
-
result = tokenizer.decode(outputs[0], skip_special_tokens=True)
|
| 75 |
-
|
| 76 |
-
# Extract the materials output
|
| 77 |
-
materials = result[len(prompt):].strip()
|
| 78 |
-
print(json.loads(materials))
|
| 79 |
-
# Expected output: [{"Bronze": ["bronze"]}, {"Marble": ["marble"]}, {"Gold leaf": ["gold", "leaf"]}]
|
| 80 |
-
```
|
| 81 |
-
|
| 82 |
-
## Expected Output Format
|
| 83 |
-
|
| 84 |
-
The model outputs materials in JSON format where each material combination is mapped to its constituent AAT terms:
|
| 85 |
|
| 86 |
-
|
| 87 |
-
|
| 88 |
-
|
| 89 |
-
|
| 90 |
-
{"bronze": ["bronze"]}
|
| 91 |
-
]
|
| 92 |
```
|
| 93 |
|
| 94 |
-
## Training
|
| 95 |
|
| 96 |
-
|
| 97 |
|
| 98 |
-
### Training Details
|
| 99 |
-
- **Base Model**: Qwen/Qwen3-0.6B
|
| 100 |
-
- **Training Method**: Supervised Fine-Tuning (SFT) with TRL
|
| 101 |
-
- **Dataset**: Synthetic AAT materials dataset
|
| 102 |
-
- **Infrastructure**: Trained using Hugging Face Jobs
|
| 103 |
-
- **Epochs**: 3
|
| 104 |
-
- **Batch Size**: 4 (with gradient accumulation)
|
| 105 |
-
- **Learning Rate**: 2e-5
|
| 106 |
-
- **Context**: Cultural heritage object descriptions → AAT materials mapping
|
| 107 |
|
| 108 |
-
|
| 109 |
-
The training dataset includes diverse object types:
|
| 110 |
-
- Historical artifacts from various time periods
|
| 111 |
-
- Multiple material combinations per object
|
| 112 |
-
- Professional museum cataloging terminology
|
| 113 |
-
- AAT-compliant material classifications
|
| 114 |
|
| 115 |
### Framework versions
|
| 116 |
|
| 117 |
-
- TRL: 0.
|
| 118 |
-
- Transformers: 4.
|
| 119 |
-
- Pytorch: 2.
|
| 120 |
-
- Datasets: 4.
|
| 121 |
-
- Tokenizers: 0.
|
| 122 |
|
| 123 |
## Citations
|
| 124 |
|
|
|
|
| 6 |
- generated_from_trainer
|
| 7 |
- sft
|
| 8 |
- trl
|
| 9 |
+
licence: license
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 10 |
---
|
| 11 |
|
| 12 |
# Model Card for Qwen3-0.6B-SFT-AAT-Materials
|
| 13 |
|
| 14 |
+
This model is a fine-tuned version of [Qwen/Qwen3-0.6B](https://huggingface.co/Qwen/Qwen3-0.6B).
|
| 15 |
+
It has been trained using [TRL](https://github.com/huggingface/trl).
|
| 16 |
|
| 17 |
+
## Quick start
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 18 |
|
| 19 |
```python
|
| 20 |
+
from transformers import pipeline
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 21 |
|
| 22 |
+
question = "If you had a time machine, but could only go to the past or the future once and never return, which would you choose and why?"
|
| 23 |
+
generator = pipeline("text-generation", model="small-models-for-glam/Qwen3-0.6B-SFT-AAT-Materials", device="cuda")
|
| 24 |
+
output = generator([{"role": "user", "content": question}], max_new_tokens=128, return_full_text=False)[0]
|
| 25 |
+
print(output["generated_text"])
|
|
|
|
|
|
|
| 26 |
```
|
| 27 |
|
| 28 |
+
## Training procedure
|
| 29 |
|
| 30 |
+
|
| 31 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 32 |
|
| 33 |
+
This model was trained with SFT.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 34 |
|
| 35 |
### Framework versions
|
| 36 |
|
| 37 |
+
- TRL: 0.21.0
|
| 38 |
+
- Transformers: 4.55.0
|
| 39 |
+
- Pytorch: 2.7.1
|
| 40 |
+
- Datasets: 4.0.0
|
| 41 |
+
- Tokenizers: 0.21.2
|
| 42 |
|
| 43 |
## Citations
|
| 44 |
|
adapter_config.json
CHANGED
|
@@ -28,13 +28,13 @@
|
|
| 28 |
"rank_pattern": {},
|
| 29 |
"revision": null,
|
| 30 |
"target_modules": [
|
| 31 |
-
"o_proj",
|
| 32 |
-
"q_proj",
|
| 33 |
-
"gate_proj",
|
| 34 |
"k_proj",
|
| 35 |
-
"
|
| 36 |
"v_proj",
|
| 37 |
-
"down_proj"
|
|
|
|
|
|
|
|
|
|
| 38 |
],
|
| 39 |
"target_parameters": null,
|
| 40 |
"task_type": "CAUSAL_LM",
|
|
|
|
| 28 |
"rank_pattern": {},
|
| 29 |
"revision": null,
|
| 30 |
"target_modules": [
|
|
|
|
|
|
|
|
|
|
| 31 |
"k_proj",
|
| 32 |
+
"q_proj",
|
| 33 |
"v_proj",
|
| 34 |
+
"down_proj",
|
| 35 |
+
"o_proj",
|
| 36 |
+
"up_proj",
|
| 37 |
+
"gate_proj"
|
| 38 |
],
|
| 39 |
"target_parameters": null,
|
| 40 |
"task_type": "CAUSAL_LM",
|
adapter_model.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 1285083888
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:8caddcf6d3776a2283637284b7dc9157fe757810e8b76712e2fd4293201a720e
|
| 3 |
size 1285083888
|
training_args.bin
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e6e67f8d02de1f971927f1e9ad930f7f68bf25b68878773f120c5add816f4001
|
| 3 |
+
size 6225
|