Upload folder using huggingface_hub
Browse files- config.json +54 -0
- format.txt +1 -0
- generation_config.json +14 -0
- model.safetensors +3 -0
- prompt_v2.md +66 -0
- trainer_state.json +0 -0
- training_args.bin +3 -0
    	
        config.json
    ADDED
    
    | @@ -0,0 +1,54 @@ | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | 
|  | |
| 1 | 
            +
            {
         | 
| 2 | 
            +
              "architectures": [
         | 
| 3 | 
            +
                "Qwen2ForCausalLM"
         | 
| 4 | 
            +
              ],
         | 
| 5 | 
            +
              "attention_dropout": 0.0,
         | 
| 6 | 
            +
              "bos_token_id": 151643,
         | 
| 7 | 
            +
              "eos_token_id": 151645,
         | 
| 8 | 
            +
              "hidden_act": "silu",
         | 
| 9 | 
            +
              "hidden_size": 896,
         | 
| 10 | 
            +
              "initializer_range": 0.02,
         | 
| 11 | 
            +
              "intermediate_size": 4864,
         | 
| 12 | 
            +
              "layer_types": [
         | 
| 13 | 
            +
                "full_attention",
         | 
| 14 | 
            +
                "full_attention",
         | 
| 15 | 
            +
                "full_attention",
         | 
| 16 | 
            +
                "full_attention",
         | 
| 17 | 
            +
                "full_attention",
         | 
| 18 | 
            +
                "full_attention",
         | 
| 19 | 
            +
                "full_attention",
         | 
| 20 | 
            +
                "full_attention",
         | 
| 21 | 
            +
                "full_attention",
         | 
| 22 | 
            +
                "full_attention",
         | 
| 23 | 
            +
                "full_attention",
         | 
| 24 | 
            +
                "full_attention",
         | 
| 25 | 
            +
                "full_attention",
         | 
| 26 | 
            +
                "full_attention",
         | 
| 27 | 
            +
                "full_attention",
         | 
| 28 | 
            +
                "full_attention",
         | 
| 29 | 
            +
                "full_attention",
         | 
| 30 | 
            +
                "full_attention",
         | 
| 31 | 
            +
                "full_attention",
         | 
| 32 | 
            +
                "full_attention",
         | 
| 33 | 
            +
                "full_attention",
         | 
| 34 | 
            +
                "full_attention",
         | 
| 35 | 
            +
                "full_attention",
         | 
| 36 | 
            +
                "full_attention"
         | 
| 37 | 
            +
              ],
         | 
| 38 | 
            +
              "max_position_embeddings": 32768,
         | 
| 39 | 
            +
              "max_window_layers": 21,
         | 
| 40 | 
            +
              "model_type": "qwen2",
         | 
| 41 | 
            +
              "num_attention_heads": 14,
         | 
| 42 | 
            +
              "num_hidden_layers": 24,
         | 
| 43 | 
            +
              "num_key_value_heads": 2,
         | 
| 44 | 
            +
              "rms_norm_eps": 1e-06,
         | 
| 45 | 
            +
              "rope_scaling": null,
         | 
| 46 | 
            +
              "rope_theta": 1000000.0,
         | 
| 47 | 
            +
              "sliding_window": null,
         | 
| 48 | 
            +
              "tie_word_embeddings": true,
         | 
| 49 | 
            +
              "torch_dtype": "bfloat16",
         | 
| 50 | 
            +
              "transformers_version": "4.53.1",
         | 
| 51 | 
            +
              "use_cache": true,
         | 
| 52 | 
            +
              "use_sliding_window": false,
         | 
| 53 | 
            +
              "vocab_size": 151936
         | 
| 54 | 
            +
            }
         | 
    	
        format.txt
    ADDED
    
    | @@ -0,0 +1 @@ | |
|  | 
|  | |
| 1 | 
            +
            prompt = f"{PROMPT}{input_text}\n### **Romaji Output**\n"
         | 
    	
        generation_config.json
    ADDED
    
    | @@ -0,0 +1,14 @@ | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | 
|  | |
| 1 | 
            +
            {
         | 
| 2 | 
            +
              "bos_token_id": 151643,
         | 
| 3 | 
            +
              "do_sample": true,
         | 
| 4 | 
            +
              "eos_token_id": [
         | 
| 5 | 
            +
                151645,
         | 
| 6 | 
            +
                151643
         | 
| 7 | 
            +
              ],
         | 
| 8 | 
            +
              "pad_token_id": 151643,
         | 
| 9 | 
            +
              "repetition_penalty": 1.1,
         | 
| 10 | 
            +
              "temperature": 0.7,
         | 
| 11 | 
            +
              "top_k": 20,
         | 
| 12 | 
            +
              "top_p": 0.8,
         | 
| 13 | 
            +
              "transformers_version": "4.53.1"
         | 
| 14 | 
            +
            }
         | 
    	
        model.safetensors
    ADDED
    
    | @@ -0,0 +1,3 @@ | |
|  | |
|  | |
|  | 
|  | |
| 1 | 
            +
            version https://git-lfs.github.com/spec/v1
         | 
| 2 | 
            +
            oid sha256:eccb85380b3a542881a1411ed94874658dc52f943ff9da0eb652b583d5bd9f2b
         | 
| 3 | 
            +
            size 988097824
         | 
    	
        prompt_v2.md
    ADDED
    
    | @@ -0,0 +1,66 @@ | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | 
|  | |
| 1 | 
            +
            Japanese to Modified Hepburn Romaji Conversion
         | 
| 2 | 
            +
             | 
| 3 | 
            +
            You are an expert linguist AI specializing in the precise romanization of the Japanese language. Your task is to convert any given Japanese text into Romaji using the **Modified Hepburn system**.
         | 
| 4 | 
            +
             | 
| 5 | 
            +
            You must follow a strict, two-phase process for every conversion to ensure maximum accuracy.
         | 
| 6 | 
            +
             | 
| 7 | 
            +
            ---
         | 
| 8 | 
            +
             | 
| 9 | 
            +
            ## **Phase 1: Convert Input Text to a Standardized Kana String**
         | 
| 10 | 
            +
             | 
| 11 | 
            +
            Before romanizing, you must first process the input text into a phonetically accurate string composed only of Hiragana and Katakana.
         | 
| 12 | 
            +
             | 
| 13 | 
            +
            1.  **Kanji-to-Hiragana Conversion:**
         | 
| 14 | 
            +
                * Convert all Kanji characters and compounds (*jukugo*) into their correct Hiragana readings.
         | 
| 15 | 
            +
                * You must use contextual analysis to select the correct `on'yomi` or `kun'yomi`.
         | 
| 16 | 
            +
                * Pay close attention to irregular readings for compounds like `δ»ζ₯` (γγγ) and `ε€§δΊΊ` (γγ¨γͺ).
         | 
| 17 | 
            +
             | 
| 18 | 
            +
            2.  **Apply Phonetic Rules:**
         | 
| 19 | 
            +
                * **Rendaku (Sequential Voicing):** Apply voicing to the initial consonant of the second element in a compound where appropriate (e.g., `ζη΄` becomes `γ¦γγΏ`).
         | 
| 20 | 
            +
                * **Okurigana:** Correctly read the Kanji stem based on its accompanying Hiragana endings (e.g., `ι£γΉγ` is `γγΉγ`, not `γγγγΉγ`).
         | 
| 21 | 
            +
             | 
| 22 | 
            +
            3.  **Preserve Katakana:**
         | 
| 23 | 
            +
                * Do **not** convert existing Katakana to Hiragana.
         | 
| 24 | 
            +
                * Maintain all Katakana used for foreign loanwords (`γ³γ³γγ₯γΌγΏγΌ`), onomatopoeia (`γγγγ`), scientific terms, or emphasis.
         | 
| 25 | 
            +
             | 
| 26 | 
            +
            The result of this phase should be an intermediate, phonetically pure Kana string.
         | 
| 27 | 
            +
             | 
| 28 | 
            +
            ---
         | 
| 29 | 
            +
             | 
| 30 | 
            +
            ## **Phase 2: Convert the Kana String to Modified Hepburn Romaji**
         | 
| 31 | 
            +
             | 
| 32 | 
            +
            Using the standardized Kana string from Phase 1, apply the following rules precisely.
         | 
| 33 | 
            +
             | 
| 34 | 
            +
            1.  **Standard Romanization:** Convert each Kana character based on the standard Hepburn table (`γ` -> `ka`, `γ` -> `shi`, `γ€` -> `tsu`, etc.).
         | 
| 35 | 
            +
             | 
| 36 | 
            +
            2.  **Long Vowels (ChΕonpu):**
         | 
| 37 | 
            +
                * Use a **macron** to indicate a long vowel.
         | 
| 38 | 
            +
                * `γγ` or `γγ` β `Ε` (e.g., `γ¨γγγγ` β `TΕkyΕ`)
         | 
| 39 | 
            +
                * `γγ` β `Ε«` (e.g., `γγγ` β `kΕ«ki`)
         | 
| 40 | 
            +
                * `γγ` β `Δ` (e.g., `γγ` β `Δ`)
         | 
| 41 | 
            +
                * The Katakana long vowel mark `γΌ` also indicates a macron (e.g., `γ»γΌγΏγΌ` β `sΔtΔ`).
         | 
| 42 | 
            +
                * **Crucial Exception:** Romanize `γγ` as `ei`, not `Δ` (e.g., `γγγγ` β `sensei`).
         | 
| 43 | 
            +
             | 
| 44 | 
            +
            3.  **Double Consonants (Sokuon `γ£`):**
         | 
| 45 | 
            +
                * Double the consonant of the following syllable (e.g., `γγ£γ¦` β `kitte`).
         | 
| 46 | 
            +
                * **Exception:** When preceding `γ‘` (chi), use `tch` (e.g., `γΎγ£γ‘γ` β `matcha`).
         | 
| 47 | 
            +
             | 
| 48 | 
            +
            4.  **The Syllabic 'n' (`γ`):**
         | 
| 49 | 
            +
                * Before consonants, it is always `n` (e.g., `γγγΆγ` -> `shinbun`).
         | 
| 50 | 
            +
                * **Before vowels or the letter 'y', you MUST use an apostrophe** to separate the sounds (e.g., `γγγγ` β `shin'yΕ`; `γγγ` β `kan'i`).
         | 
| 51 | 
            +
             | 
| 52 | 
            +
            5.  **Special Particle Romanization:**
         | 
| 53 | 
            +
                * The particle `γ―` must be romanized as `wa`.
         | 
| 54 | 
            +
                * The particle `γΈ` must be romanized as `e`.
         | 
| 55 | 
            +
                * The particle `γ` must be romanized as `o`.
         | 
| 56 | 
            +
             | 
| 57 | 
            +
            6.  **To lower case:**
         | 
| 58 | 
            +
                * Convert all text to lower case.
         | 
| 59 | 
            +
             | 
| 60 | 
            +
            ---
         | 
| 61 | 
            +
             | 
| 62 | 
            +
            ### **Execution Task**
         | 
| 63 | 
            +
             | 
| 64 | 
            +
            Now, apply this two-phase process to the following text. Provide only the final Romaji output.
         | 
| 65 | 
            +
             | 
| 66 | 
            +
            ### **Japanese Input**
         | 
    	
        trainer_state.json
    ADDED
    
    | The diff for this file is too large to render. 
		See raw diff | 
|  | 
    	
        training_args.bin
    ADDED
    
    | @@ -0,0 +1,3 @@ | |
|  | |
|  | |
|  | 
|  | |
| 1 | 
            +
            version https://git-lfs.github.com/spec/v1
         | 
| 2 | 
            +
            oid sha256:28af7cd5804fb4411da8a541d6770cc312addee0ea1e41536a579c0c2fb330c9
         | 
| 3 | 
            +
            size 5368
         | 
