Upload folder using huggingface_hub
Browse filesFiles changed (2)
- architecture.py+4-1
- config.json+3-4
3 unmodified lines45678910104 unmodified lines1151161171183 unmodified linesimport torch.nn as nnimport torch.nn.functional as Ffrom typing import Optional, Dict# This file contains the custom nn.Module definitions required by the fine-tuned model.# By placing them here, the main training script is cleaner, and more importantly,# this file can be packaged with the model for easy loading from the Hugging Face Hub.104 unmodified linesreturn corrected_activation# --- END OF FILE architecture.py ---3 unmodified lines456789101112104 unmodified lines1171181191201213 unmodified linesimport torch.nn as nnimport torch.nn.functional as Ffrom typing import Optional, Dictfrom transformers import AutoConfig, AutoModelForCausalLMfrom transformers.models.phi3.configuration_phi3 import Phi3Configfrom transformers.models.phi3.modeling_phi3 import Phi3ForCausalLM# This file contains the custom nn.Module definitions required by the fine-tuned model.# By placing them here, the main training script is cleaner, and more importantly,# this file can be packaged with the model for easy loading from the Hugging Face Hub.104 unmodified linesreturn corrected_activationAutoModelForCausalLM.register(Phi3Config, Phi3WithVectorMemoryForCausalLM)# --- END OF FILE architecture.py ---
12345678910111219 unmodified lines32333435{"architectures": ["Phi3ForCausalLM"],"attention_bias": false,"attention_dropout": 0.0,"auto_map": {"AutoConfig": "microsoft/Phi-3-mini-4k-instruct--configuration_phi3.Phi3Config","AutoModelForCausalLM": "microsoft/Phi-3-mini-4k-instruct--modeling_phi3.Phi3ForCausalLM"},"bos_token_id": 1,"embd_pdrop": 0.0,19 unmodified lines"transformers_version": "4.52.4","use_cache": true,"vocab_size": 32064}123456789101119 unmodified lines31323334{"architectures": ["Phi3WithVectorMemoryForCausalLM"],"attention_bias": false,"attention_dropout": 0.0,"auto_map": {"AutoModelForCausalLM": "architecture.Phi3WithVectorMemoryForCausalLM"},"bos_token_id": 1,"embd_pdrop": 0.0,19 unmodified lines"transformers_version": "4.52.4","use_cache": true,"vocab_size": 32064}
architecture.py+4-1
config.json+3-4