初始化项目,由ModelHub XC社区提供模型
Model: ramyaa1113/gemma2b-webxr-showroom-v2 Source: Original Platform
This commit is contained in:
36
.gitattributes
vendored
Normal file
36
.gitattributes
vendored
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.arrow filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.bin filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.ckpt filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.ftz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.h5 filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.joblib filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.lfs.* filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.mlmodel filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.model filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.msgpack filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.npy filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.npz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.onnx filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.ot filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.parquet filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.pb filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.pickle filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.pkl filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.pt filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.pth filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.rar filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.safetensors filter=lfs diff=lfs merge=lfs -text
|
||||||
|
saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.tar.* filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.tar filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.tflite filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.wasm filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.zst filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
||||||
|
tokenizer.json filter=lfs diff=lfs merge=lfs -text
|
||||||
292
README.md
Normal file
292
README.md
Normal file
@@ -0,0 +1,292 @@
|
|||||||
|
---
|
||||||
|
library_name: transformers
|
||||||
|
pipeline_tag: text-generation
|
||||||
|
base_model: google/gemma-2b
|
||||||
|
language:
|
||||||
|
- en
|
||||||
|
tags:
|
||||||
|
- text-generation
|
||||||
|
- conversational
|
||||||
|
- small-language-model
|
||||||
|
- webxr
|
||||||
|
- virtual-assistant
|
||||||
|
- xr-ai
|
||||||
|
- babylonjs
|
||||||
|
- immersive-ai
|
||||||
|
datasets:
|
||||||
|
- custom
|
||||||
|
license: gemma
|
||||||
|
---
|
||||||
|
|
||||||
|
|
||||||
|
# gemma2b-webxr-showroom-v2
|
||||||
|
|
||||||
|
Fine-tuned Small Language Model designed for **AI-assisted interactions inside WebXR virtual showrooms and immersive product environments**.
|
||||||
|
|
||||||
|
This model powers conversational assistants that guide users through **3D product experiences**, explain features, and answer questions in immersive environments.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
# Model Details
|
||||||
|
|
||||||
|
## Model Description
|
||||||
|
|
||||||
|
**gemma2b-webxr-showroom-v2** is a fine-tuned conversational model based on **Gemma 2B**.
|
||||||
|
It is optimized to act as an **AI showroom assistant** in immersive XR applications.
|
||||||
|
|
||||||
|
The model was trained to generate responses related to:
|
||||||
|
|
||||||
|
* product explanations
|
||||||
|
* feature descriptions
|
||||||
|
* interactive showroom guidance
|
||||||
|
* conversational product queries
|
||||||
|
* virtual retail assistance
|
||||||
|
|
||||||
|
The model is part of the **IntelliShop XR project**, which demonstrates how **AI assistants can enhance WebXR product exploration experiences**.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### Developed by
|
||||||
|
|
||||||
|
Rajalakshmi Mahadevan (Ramya)
|
||||||
|
|
||||||
|
### Model Type
|
||||||
|
|
||||||
|
Causal Language Model (Text Generation)
|
||||||
|
|
||||||
|
### Language
|
||||||
|
|
||||||
|
English
|
||||||
|
|
||||||
|
### License
|
||||||
|
|
||||||
|
Gemma license (inherits base model licensing requirements)
|
||||||
|
|
||||||
|
### Finetuned From
|
||||||
|
|
||||||
|
google/gemma-2b
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
# Model Sources
|
||||||
|
|
||||||
|
Repository
|
||||||
|
https://huggingface.co/ramyaa1113/gemma2b-webxr-showroom-v2
|
||||||
|
|
||||||
|
Project Context
|
||||||
|
IntelliShop XR – AI Assisted Virtual Showroom
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
# Intended Uses
|
||||||
|
|
||||||
|
## Direct Use
|
||||||
|
|
||||||
|
This model is designed to function as a **virtual assistant inside immersive environments**.
|
||||||
|
|
||||||
|
Example uses include:
|
||||||
|
|
||||||
|
* WebXR virtual product showrooms
|
||||||
|
* immersive e-commerce experiences
|
||||||
|
* AI guides inside 3D environments
|
||||||
|
* product demonstration assistants
|
||||||
|
* conversational retail bots
|
||||||
|
|
||||||
|
Example interaction:
|
||||||
|
|
||||||
|
User
|
||||||
|
Tell me about this XR headset.
|
||||||
|
|
||||||
|
Assistant
|
||||||
|
This XR headset features a high-resolution display, inside-out tracking, and hand tracking support designed for immersive experiences.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Downstream Use
|
||||||
|
|
||||||
|
The model can be integrated into larger systems such as:
|
||||||
|
|
||||||
|
* WebXR applications
|
||||||
|
* Babylon.js interactive environments
|
||||||
|
* AI powered virtual stores
|
||||||
|
* conversational interfaces for immersive applications
|
||||||
|
|
||||||
|
Typical architecture:
|
||||||
|
|
||||||
|
WebXR Application
|
||||||
|
→ Backend API
|
||||||
|
→ gemma2b-webxr-showroom-v2
|
||||||
|
→ AI response returned to user
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Out-of-Scope Use
|
||||||
|
|
||||||
|
This model is **not intended for**:
|
||||||
|
|
||||||
|
* medical advice
|
||||||
|
* legal consultation
|
||||||
|
* financial decision making
|
||||||
|
* safety critical systems
|
||||||
|
|
||||||
|
The model is optimized specifically for **interactive product assistance scenarios**.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
# Bias, Risks, and Limitations
|
||||||
|
|
||||||
|
Like most language models, this model may:
|
||||||
|
|
||||||
|
* produce incorrect or incomplete information
|
||||||
|
* generate hallucinated details
|
||||||
|
* reflect biases present in training data
|
||||||
|
|
||||||
|
Additionally, the model is **domain tuned**, meaning performance may degrade for topics unrelated to product explanations or showroom interactions.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
# Recommendations
|
||||||
|
|
||||||
|
To improve reliability:
|
||||||
|
|
||||||
|
* use structured product metadata as context
|
||||||
|
* restrict prompts to product related queries
|
||||||
|
* implement response validation in production systems
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
# How to Use the Model
|
||||||
|
|
||||||
|
Example using Transformers:
|
||||||
|
|
||||||
|
```python
|
||||||
|
from transformers import AutoTokenizer, AutoModelForCausalLM
|
||||||
|
import torch
|
||||||
|
|
||||||
|
model_id = "ramyaa1113/gemma2b-webxr-showroom-v2"
|
||||||
|
|
||||||
|
tokenizer = AutoTokenizer.from_pretrained(model_id)
|
||||||
|
model = AutoModelForCausalLM.from_pretrained(model_id)
|
||||||
|
|
||||||
|
prompt = "Explain the features of this XR headset."
|
||||||
|
|
||||||
|
inputs = tokenizer(prompt, return_tensors="pt")
|
||||||
|
|
||||||
|
outputs = model.generate(
|
||||||
|
**inputs,
|
||||||
|
max_new_tokens=150
|
||||||
|
)
|
||||||
|
|
||||||
|
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
# Training Details
|
||||||
|
|
||||||
|
## Training Data
|
||||||
|
|
||||||
|
A custom dataset of approximately **15,000 samples** was created for training.
|
||||||
|
|
||||||
|
The dataset includes:
|
||||||
|
|
||||||
|
* product explanation prompts
|
||||||
|
* conversational showroom interactions
|
||||||
|
* feature descriptions
|
||||||
|
* assistant style product responses
|
||||||
|
* retail dialogue examples
|
||||||
|
|
||||||
|
The dataset was curated to simulate **real user interactions inside virtual showrooms**.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Training Procedure
|
||||||
|
|
||||||
|
### Training Environment
|
||||||
|
|
||||||
|
Initial experiments were conducted using **Google Colab**, but runtime instability and GPU limits caused interruptions.
|
||||||
|
|
||||||
|
Training was then migrated to **Kaggle GPU notebooks**, which provided a more stable environment for completing the training pipeline.
|
||||||
|
|
||||||
|
### Training Regime
|
||||||
|
|
||||||
|
Mixed precision training (fp16)
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
# Evaluation
|
||||||
|
|
||||||
|
Formal benchmark evaluation has not yet been conducted.
|
||||||
|
Evaluation currently focuses on **qualitative testing within XR product interaction scenarios**.
|
||||||
|
|
||||||
|
Testing scenarios include:
|
||||||
|
|
||||||
|
* product explanation quality
|
||||||
|
* conversational response clarity
|
||||||
|
* interactive assistant behavior in virtual environments
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
# Environmental Impact
|
||||||
|
|
||||||
|
Estimated training environment:
|
||||||
|
|
||||||
|
Hardware Type
|
||||||
|
NVIDIA T4 GPU
|
||||||
|
|
||||||
|
Compute Platform
|
||||||
|
Kaggle Notebooks
|
||||||
|
|
||||||
|
Training Duration
|
||||||
|
Several training runs across multiple sessions
|
||||||
|
|
||||||
|
Carbon emissions are estimated to be relatively low due to the small model size and limited training duration.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
# Technical Specifications
|
||||||
|
|
||||||
|
## Model Architecture
|
||||||
|
|
||||||
|
Base architecture
|
||||||
|
Gemma 2B transformer decoder
|
||||||
|
|
||||||
|
Task
|
||||||
|
Causal language modeling (text generation)
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Compute Infrastructure
|
||||||
|
|
||||||
|
### Hardware
|
||||||
|
|
||||||
|
NVIDIA T4 GPU (Kaggle)
|
||||||
|
|
||||||
|
### Software
|
||||||
|
|
||||||
|
Python
|
||||||
|
PyTorch
|
||||||
|
Transformers
|
||||||
|
Hugging Face ecosystem
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
# Author
|
||||||
|
|
||||||
|
Rajalakshmi Mahadevan (Ramya)
|
||||||
|
|
||||||
|
XR and AI Developer working at the intersection of:
|
||||||
|
|
||||||
|
* Extended Reality (XR)
|
||||||
|
* WebXR
|
||||||
|
* Real-time 3D systems
|
||||||
|
* AI-powered immersive experiences
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
# Model Card Contact
|
||||||
|
|
||||||
|
For questions or collaboration:
|
||||||
|
|
||||||
|
Hugging Face
|
||||||
|
https://huggingface.co/ramyaa1113
|
||||||
4
chat_template.jinja
Normal file
4
chat_template.jinja
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
{{ bos_token }}{% if messages[0]['role'] == 'system' %}{{ raise_exception('System role not supported') }}{% endif %}{% for message in messages %}{% if (message['role'] == 'user') != (loop.index0 % 2 == 0) %}{{ raise_exception('Conversation roles must alternate user/assistant/user/assistant/...') }}{% endif %}{% if (message['role'] == 'assistant') %}{% set role = 'model' %}{% else %}{% set role = message['role'] %}{% endif %}{{ '<start_of_turn>' + role + '
|
||||||
|
' + message['content'] | trim + '<end_of_turn>
|
||||||
|
' }}{% endfor %}{% if add_generation_prompt %}{{'<start_of_turn>model
|
||||||
|
'}}{% endif %}
|
||||||
31
config.json
Normal file
31
config.json
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
{
|
||||||
|
"architectures": [
|
||||||
|
"GemmaForCausalLM"
|
||||||
|
],
|
||||||
|
"attention_bias": false,
|
||||||
|
"attention_dropout": 0.0,
|
||||||
|
"bos_token_id": 2,
|
||||||
|
"dtype": "float16",
|
||||||
|
"eos_token_id": 1,
|
||||||
|
"head_dim": 256,
|
||||||
|
"hidden_act": "gelu",
|
||||||
|
"hidden_size": 2048,
|
||||||
|
"initializer_range": 0.02,
|
||||||
|
"intermediate_size": 16384,
|
||||||
|
"max_position_embeddings": 8192,
|
||||||
|
"model_type": "gemma",
|
||||||
|
"num_attention_heads": 8,
|
||||||
|
"num_hidden_layers": 18,
|
||||||
|
"num_key_value_heads": 1,
|
||||||
|
"pad_token_id": 0,
|
||||||
|
"rms_norm_eps": 1e-06,
|
||||||
|
"rope_parameters": {
|
||||||
|
"rope_theta": 10000.0,
|
||||||
|
"rope_type": "default"
|
||||||
|
},
|
||||||
|
"tie_word_embeddings": true,
|
||||||
|
"transformers_version": "5.2.0",
|
||||||
|
"use_bidirectional_attention": null,
|
||||||
|
"use_cache": true,
|
||||||
|
"vocab_size": 256000
|
||||||
|
}
|
||||||
7
generation_config.json
Normal file
7
generation_config.json
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"_from_model_config": true,
|
||||||
|
"bos_token_id": 2,
|
||||||
|
"eos_token_id": 1,
|
||||||
|
"pad_token_id": 0,
|
||||||
|
"transformers_version": "5.2.0"
|
||||||
|
}
|
||||||
3
model.safetensors
Normal file
3
model.safetensors
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:cb20b395e54825a2c920697416acf56769957753830da364caf816f1f92161b8
|
||||||
|
size 5012363688
|
||||||
3
tokenizer.json
Normal file
3
tokenizer.json
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:ae4adcd4b80a962290f1ad489ecf8f1d91009d736381c98d9ac54c949b6a7e42
|
||||||
|
size 34349305
|
||||||
19
tokenizer_config.json
Normal file
19
tokenizer_config.json
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
{
|
||||||
|
"backend": "tokenizers",
|
||||||
|
"bos_token": "<bos>",
|
||||||
|
"clean_up_tokenization_spaces": false,
|
||||||
|
"eos_token": "<eos>",
|
||||||
|
"extra_special_tokens": {
|
||||||
|
"start_of_turn": "<start_of_turn>",
|
||||||
|
"end_of_turn": "<end_of_turn>"
|
||||||
|
},
|
||||||
|
"is_local": false,
|
||||||
|
"mask_token": "<mask>",
|
||||||
|
"model_max_length": 1000000000000000019884624838656,
|
||||||
|
"pad_token": "<pad>",
|
||||||
|
"sp_model_kwargs": {},
|
||||||
|
"spaces_between_special_tokens": false,
|
||||||
|
"tokenizer_class": "GemmaTokenizer",
|
||||||
|
"unk_token": "<unk>",
|
||||||
|
"use_default_system_prompt": false
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user