<PAGE>

                                                                       EXECUTION

                         GSR MORTGAGE LOAN TRUST 2004-7

                       MORTGAGE PASS-THROUGH CERTIFICATES

                                  SERIES 2004-7

                                 TRUST AGREEMENT

                                     BETWEEN

                          GS MORTGAGE SECURITIES CORP.,
                                  AS DEPOSITOR,

                                       AND

                              JPMORGAN CHASE BANK,
                                   AS TRUSTEE

                               DATED JUNE 1, 2004

111484 GSR 2004-7
Trust Agreement

<PAGE>

                                TABLE OF CONTENTS

<TABLE>
<CAPTION>
                                                                                     Page
                                                                                     ----
<S>             <C>                                                                  <C>
                                    ARTICLE I

                                   DEFINITIONS

Section 1.01    Standard Terms..................................................      1
Section 1.02    Defined Terms...................................................      2

                               ARTICLE II

                FORMATION OF TRUST; CONVEYANCE OF MORTGAGE LOANS

Section 2.01    Conveyance to the Trustee.......................................     13
Section 2.02    Acceptance by the Trustee.......................................     13
Section 2.03    REMIC Elections and REMIC Designation...........................     14

                               ARTICLE III

                     REMITTING TO CERTIFICATEHOLDERS

Section 3.01    Distributions to Certificateholders.............................     16
Section 3.02    Allocation of Realized Losses and Shortfalls....................     19
Section 3.03    Crossover Amounts...............................................     20

                               ARTICLE IV

                             THE SECURITIES

Section 4.01    The Certificates................................................     21
Section 4.02    Denominations...................................................     21
Section 4.03    Redemption of Certificates......................................     22
Section 4.04    Securities Laws Restrictions....................................     22

                                ARTICLE V

                        MISCELLANEOUS PROVISIONS

Section 5.01    Request for Opinions............................................     22
Section 5.02    Schedules and Exhibits..........................................     23
Section 5.03    Governing Law...................................................     23
Section 5.04    Counterparts....................................................     23
Section 5.05    Notices.........................................................     23
</TABLE>

111484 GSR 2004-7
Trust Agreement

                                        i

<PAGE>

                             SCHEDULES AND EXHIBITS

Schedule I      Mortgage Loans
Exhibit 1A1     Form of Class 1A1 Certificate
Exhibit 1A2     Form of Class 1A2 Certificate
Exhibit 1A3     Form of Class 1A3 Certificate
Exhibit 2A1     Form of Class 2A1 Certificate
Exhibit 3A1     Form of Class 3A1 Certificate
Exhibit 4A1     Form of Class 4A1 Certificate
Exhibit B1      Form of Class B1 Certificate
Exhibit B2      Form of Class B2 Certificate
Exhibit B3      Form of Class B3 Certificate
Exhibit B4      Form of Class B4 Certificate
Exhibit B5      Form of Class B5 Certificate
Exhibit B6      Form of Class B6 Certificate
Exhibit R       Form of Class R Certificate

111484 GSR 2004-7
Trust Agreement

                                       ii

<PAGE>

                                 TRUST AGREEMENT

            THIS TRUST AGREEMENT, dated as of June 1, 2004 (this "Trust
Agreement"), is hereby executed between GS MORTGAGE SECURITIES CORP., a Delaware
corporation (the "Depositor"), and JPMORGAN CHASE BANK, as trustee (in such
capacity, the "Trustee") and custodian (in such capacity, the "Custodian").

                              PRELIMINARY STATEMENT

            The Depositor is duly authorized to form GSR Mortgage Loan Trust
2004-7 as a trust (the "Trust") to issue a series of securities with an
aggregate initial outstanding principal balance of $699,836,637 to be known as
the Mortgage Pass-Through Certificates, Series 2004-7 (the "Certificates"). The
Trust is formed by this Trust Agreement, which fully incorporates by reference
the Standard Terms to Trust Agreement June 2004 Edition (the "Standard Terms").
The Certificates in the aggregate evidence the entire beneficial ownership in
the Trust. The Certificates consist of the 13 classes set forth in Section
2.03(d) herein.

            Pursuant to Section 10.01 of the Standard Terms, the Trustee will
make an election to treat all of the assets of the Trust as two real estate
mortgage investment conduits (each, a "REMIC" and, individually, "REMIC I" and
"REMIC II") for federal income tax purposes. The "startup day" of each REMIC for
purposes of the REMIC Provisions is the Closing Date.

            NOW, THEREFORE, in consideration of the mutual promises, covenants,
representations and warranties hereinafter set forth, the Depositor, the Trustee
and the Custodian agree as follows:

                                   ARTICLE I

                                   DEFINITIONS

            Section 1.01 Standard Terms. The Depositor, the Trustee and the
Custodian acknowledge that the Standard Terms prescribe certain obligations of
each such entity, with respect to the Certificates. The Depositor, the Trustee
and the Custodian agree to observe and perform such prescribed duties,
responsibilities and obligations, pursuant to the terms and conditions thereof
and of this Trust Agreement, and acknowledge that, except to the extent
inconsistent with the provisions of this Trust Agreement, the Standard Terms are
and shall be a part of this Trust Agreement to the same extent as if set forth
herein in full.

            Pursuant to Section 2.02(f) of the Standard Terms, the Depositor
acknowledges the appointment of the Custodian and agrees to deliver, or cause to
be delivered, to the Custodian all Mortgage Loan documents that are to be
included in the Trustee Mortgage Loan File for each Mortgage Loan. The Depositor
and the Custodian acknowledge that, pursuant to the existing Custodial
Agreements entered into between the Custodian and predecessors in interest of
the Depositor, the Custodian previously acted as custodian for such predecessors
in interest and that

111484 GSR 2004-7
Trust Agreement

                                       1

<PAGE>

in connection with the formation of the Trust, the Depositor will assign each
Custodial Agreement to the Trustee and cause a receipt to be issued in the name
of the Trustee.

            Section 1.02 Defined Terms. Capitalized terms used but not defined
herein shall have the respective meanings assigned to them in Section 1.01 of
the Standard Terms or the Servicing Agreements. In the event of a conflict
between the Standard Terms and the Servicing Agreements, the Servicing
Agreements shall govern. In the event of a conflict between the Standard Terms
and this Trust Agreement, the Trust Agreement shall govern. As used herein, the
following terms shall have the respective meanings assigned thereto:

            "Accrued Certificate Interest": For each Class of Certificates and
any Distribution Date, the sum of (i) previously accrued Certificate Interest
for such Class that remained unpaid on the previous Distribution Date (on a
cumulative basis) and (ii) accrued Certificate Interest for such Class for the
related Interest Accrual Period. Accrued Certificate Interest may be reduced for
certain interest shortfalls, as further set forth in Section 3.02.

            "Administrative Cost Rate": For each Mortgage Loan, the applicable
Servicing Fee Rate plus the Lender Paid Mortgage Insurance Rate, if applicable.

            "Affected Senior Certificates": As defined in Section 3.03.

            "Affected Subordinate Certificates": As defined in Section 3.01(c)
hereof.

            "Assignment Agreements": The Step 1 Assignment Agreements and the
Step 2 Assignment Agreements, collectively.

            "Available Distribution Amount": For any Distribution Date and any
Loan Group, the sum for the Mortgage Loans in such Loan Group of the following
amounts:

            (1)   the total amount of all cash received from or on behalf of the
      Borrowers or advanced by the applicable Servicer (or the Trustee in the
      event the Servicer fails to make any such required advances, in each case
      pursuant to Section 3.05 of the Standard Terms) on the Mortgage Loans in
      such Loan Group and not previously distributed (including Advances made by
      such Servicer (or the Trustee in the event the Servicer fails to make any
      such required advances, in each case pursuant to Section 3.05 of the
      Standard Terms), Compensating Interest Payments made by such Servicer (or
      the Trustee) and proceeds of Mortgage Loans that are liquidated), except:

                  (a)   all Scheduled Payments collected but due on a Due Date
            after that Distribution Date;

                  (b)   all Curtailments received after the previous calendar
            month;

                  (c)   all Payoffs received after the previous calendar month
            (together with any interest payment received with those Payoffs to
            the extent that it represents the payment of interest accrued on the
            Mortgage Loans for the period after the previous calendar month);

111484 GSR 2004-7
Trust Agreement

                                       2

<PAGE>

                  (d)   Liquidation Proceeds and Insurance Proceeds received on
            the Mortgage Loans in such Loan Group after the previous calendar
            month;

                  (e)   all amounts in the REMIC I Distribution Account from
            Mortgage Loans in such Loan Group that are then due and payable to
            the applicable Servicer under the related Servicing Agreement;

                  (f)   the Servicing Fee and the Lender Fee Paid Mortgage
            Insurance Amount for each Mortgage Loan in such Loan Group, net of
            any amounts payable as compensating interest by the applicable
            Servicer on that Distribution Date;

                  (g)   any Crossover Amount from such Loan Group required to be
            allocated to any other Loan Group pursuant to Section 3.03; and

                  (h)   all amounts reimbursable on such Distribution Date to
            the Trustee as provided herein.

            (2)   the total amount of any cash received by the Trustee or the
      applicable Servicer from the repurchase by the applicable Seller, the
      Depositor or GSMC of any Mortgage Loans pursuant to any Assignment
      Agreement or Sale Agreement as a result of defective documentation or
      breach of representations and warranties (provided that the obligation to
      repurchase arose before the related Due Date);

            (3)   any Crossover Amount from another Loan Group required to be
      allocated to such Loan Group pursuant to Section 3.03; and

            (4)   any Subsequent Recoveries received with respect to the
      Mortgage Loans in such Loan Group.

            "Bankruptcy Coverage": For any Distribution Date, an amount equal to
the greater of (i) (x) $191,068.69 or such lesser amount as may be determined by
the Depositor from time to time upon written confirmation from each Rating
Agency that the use of such lesser amount will not adversely affect the then
current ratings assigned to any Class of Certificates by such Rating Agency,
minus (y) the aggregate amount of Bankruptcy Losses allocated to the
Certificates on or prior to such date and (ii) zero.

            "Book-Entry Certificates": The Senior Certificates and the Senior
Subordinate Certificates.

            "Certificate Interest": For each Class of Certificates, on each
Distribution Date, an amount equal to the product of (a) the Certificate Rate
for such Class, (b) a fraction, the numerator of which is 30 and the denominator
of which is 360, and (c) the applicable Class Principal Balance.

            "Certificates": The Class 1A1, Class 1A2, Class 1A3, Class 2A1,
Class 3A1, Class 4A1, Class R, Class B1, Class B2, Class B3, Class B4, Class B5
and Class B6.

111484 GSR 2004-7
Trust Agreement

                                       3

<PAGE>

            "Certificate Rate": With respect to each Class of Certificates on
any Distribution Date, the percentage per annum rate or other entitlement to
interest described in Section 2.03 hereof.

            "Class": Each Class of Certificates or REMIC Interests.

            "Class B Certificates": The Class B1, Class B2, Class B3, Class B4,
Class B5 and Class B6 Certificates.

            "Class I Interests": The Class I-1B, Class I-1Q, Class I-2B, Class
I-2Q, Class I-3B, Class I-3Q, Class I-4B and Class I-4Q Interests, each of which
shall constitute a class of regular interests in REMIC I.

            "Class Principal Balance": With respect to each Class of
Certificates or Interests, as of the close of business on any Distribution Date,
the initial balance of such Class of Certificates or Interests set forth in
Section 2.03(d) reduced by (a) all principal payments (other than payments in
reimbursement of Realized Losses) previously distributed to such Class of
Certificates or Interests in accordance with the Trust Agreement, and (b) all
Realized Losses, if any, previously allocated to such Class of Certificates or
Interests pursuant to the Trust Agreement, and increased by (c) the amount of
any Subsequent Recoveries allocated to that Class.

            "Class R Certificates": The Class of Certificates issued hereunder
and so designated, which are each composed of the Class R-I Interest and Class
R-II Interest.

            "Class R-I Interest": The "residual interest" (as defined in Code
Section 860(a)(2)) in REMIC I, the beneficial interest in which is represented
by the Class R Certificates.

            "Class R-II Interest": The "residual interest" (as defined in Code
Section 860(a)(2)) in REMIC II, the beneficial interest in which is represented
by the Class R Certificates.

            "Closing Date": June 30, 2004.

            "Countrywide": Countrywide Home Loans, Inc., or any successor in
interest.

            "Countrywide Servicing": Countrywide Home Loans Servicing LP, or any
successor in interest.

            "CMT Rate": A rate determined based on the average weekly yield on
U.S. Treasury securities adjusted to a constant maturity of one year as
published monthly in Federal Reserve Statistical Release H.15 (519) during the
last full week occurring 45 days prior to the applicable loan adjustment date,
and annually thereafter.

            "Crossover Amounts": Amounts related to a Loan Group that are
required to be paid to the Senior Certificates related to another Loan Group
pursuant to Section 3.03.

111484 GSR 2004-7
Trust Agreement

                                       4

<PAGE>

            "Curtailments": Voluntary partial prepayments on a Mortgage Loan
(i.e., not including Payoffs, Liquidation Proceeds, Insurance Proceeds, or
Condemnation Proceeds).

            "Custodial Agreement": Each of (i) the Custodial Agreement, dated as
of March 1, 2004, among GSMC, Countrywide, and JPMorgan Chase and (ii) the
Custodial Agreement, dated as of March 1, 2004, among GSMC, Nat City, and
JPMorgan Chase.

            "Custodian": JPMorgan Chase, in its capacity as custodian under each
of the Custodial Agreements, and any successor Custodian thereunder.

            "Cut-Off Date": June 1, 2004.

            "Delinquency/Loss Test": The test as to whether the following two
conditions are satisfied on any Distribution Date: (A) the outstanding principal
balance of all Mortgage Loans delinquent 60 days or more (including Mortgage
Loans in bankruptcy or, foreclosure and REO Property) averaged over the
immediately preceding three-month period is less than or equal to 50% of the
aggregate outstanding Class Principal Balance of the Subordinate Certificates as
of such Distribution Date, and (B) cumulative Realized Losses as of each
Distribution Date prior to or occurring in July 2011, July 2012, July 2013 and
July 2014 (and each July thereafter) do not exceed 30%, 35%, 40%, 45% and 50%,
respectively, of the aggregate initial Class Principal Balance of the
Subordinate Certificates.

            "Distribution Date": The 25th day of each month, or if such day is
not a Business Day, the next Business Day following such day. The initial
Distribution Date shall be July 26, 2004.

            "Due Date": For any Mortgage Loan, the first day in each calendar
month.

            "Due Period": With respect to each Distribution Date, the period
beginning on the second day of the month preceding the month of such
Distribution Date and ending on, and including, the first day of the month of
such Distribution Date.

            "Excess Bankruptcy Losses": For any Distribution Date, the amount of
Bankruptcy Losses for such Distribution Date in excess of the Bankruptcy
Coverage for such Distribution Date.

            "Excess Fraud Losses": For any Distribution Date, the amount of
Fraud Losses for such Distribution Date in excess of the Fraud Coverage for such
Distribution Date.

            "Excess Special Hazard Losses": For any Distribution Date, the
amount of Special Hazard Losses for such Distribution Date in excess of the
Special Hazard Coverage for such Distribution Date.

            "Excess Special Losses": Collectively, Excess Fraud Losses, Excess
Bankruptcy Losses and Excess Special Hazard Losses.

            "Fraud Coverage": For any Distribution Date, an amount equal to (i)
the following percentage of the aggregate Scheduled Principal Balance of all
Mortgage Loans as of

111484 GSR 2004-7
Trust Agreement

                                       5

<PAGE>

the Due Date in the preceding calendar month (or, in the case of the first
Distribution Date, as of the Cut-Off Date): (A) for the period from and
including the Cut-Off Date to but excluding the date of the first anniversary of
the Cut-Off Date, 2.00% and (B) for the period from and including the date of
the first anniversary of the Cut-Off Date to but excluding the fifth anniversary
of the Closing Date, 1.00%, minus (ii) the aggregate amount of Fraud Losses
allocated to the Certificates on or prior to such Distribution Date. On the date
of the fifth anniversary of the Cut-Off Date, and for each Distribution Date
thereafter, the Fraud Coverage shall be zero. In no event may the Fraud Coverage
be less than zero.

            "Group 1 Certificates": The Class 1A1, 1A2 and 1A3 Certificates. The
Group 1 Certificates are related to Loan Group 1.

            "Group 2 Certificates": The Class 2A1 and Class R Certificates. The
Group 2 Certificates are related to Loan Group 2.

            "Group 3 Certificates": The Class 3A1 Certificates. The Group 3
Certificates are related to Loan Group 3.

            "Group 4 Certificates": The Class 4A1 Certificates. The Group 4
Certificates are related to Loan Group 4.

            "Group Subordinate Amount": As to any Distribution Date and (i) Loan
Group 1, will be equal to the excess of the aggregate scheduled principal
balance of the Mortgage Loans in Loan Group 1 for the preceding Distribution
Date over the aggregate Class Principal Balance of the Group 1 Certificates
after giving effect to distributions on that preceding Distribution Date, (ii)
Loan Group 2, will be equal to the excess of the aggregate scheduled principal
balance of the Mortgage Loans in Loan Group 2 for the preceding Distribution
Date over the aggregate Class Principal Balance of the Group 2 Certificates
after giving effect to distributions on that preceding Distribution Date, (iii)
Loan Group 3, will be equal to the excess of the aggregate scheduled principal
balance of the Mortgage Loans in Loan Group 3 for the preceding Distribution
Date over the aggregate Class Principal Balance of the Group 3 Certificates
after giving effect to distributions on that preceding Distribution Date and
(iv) Loan Group 4, will be equal to the excess of the aggregate scheduled
principal balance of the Mortgage Loans in Loan Group 4 for the preceding
Distribution Date over the aggregate Class Principal Balance of the Group 4
Certificates after giving effect to distribution on that preceding Distribution
Date.

            "GSMC": Goldman Sachs Mortgage Company, a New York limited
partnership, and its successors in interest.

            "Interest Accrual Period": For any Distribution Date and for any
class of Certificates, the immediately preceding calendar month.

            "JPMorgan Chase": JPMorgan Chase Bank, a New York banking
corporation, and its successors in interest.

            "Junior Subordinate Certificates": The Class B4, Class B5 and Class
B6 Certificates.

111484 GSR 2004-7
Trust Agreement

                                       6

<PAGE>

            "Lender Paid Mortgage Insurance Amount": With respect to any Lender
Paid Mortgage Insurance Loan, the interest portion of each Scheduled Payment
that is paid by the related Borrower that will be used to pay the monthly
premium of the "lender paid" primary insurance policy on such Lender Paid
Mortgage Insurance Loan, which is calculated by multiplying the Scheduled
Principal Balance as of the related date of determination on such Lender Paid
Mortgage Insurance Loan by the applicable Lender Paid Mortgage Insurance Rate.

            "Lender Paid Mortgage Insurance Loan": Each of the Mortgage Loans
identified on the Mortgage Loan Schedule as having a Lender Paid Mortgage
Insurance Rate.

            "Lender Paid Mortgage Insurance Rate": With respect to any Lender
Paid Mortgage Insurance Loan, a per annum rate equal to the percentage indicated
on the Mortgage Loan Schedule under the heading "Lender Paid Mortgage Insurance
Rate."

            "Liquidated Mortgage Loan": A Mortgage Loan for which the applicable
Servicer has determined that it has received all amounts that it expects to
recover from or on account of the Mortgage Loan, whether from Insurance
Proceeds, Liquidation Proceeds, the liquidation of any assets pledged for the
further security of such Mortgage Loan in addition to the Mortgaged Property or
otherwise.

            "Liquidation Principal": For any Distribution Date, the principal
portion of Liquidation Proceeds received with respect to each Mortgage Loan that
became a Liquidated Mortgage Loan during the calendar month preceding the month
of the Distribution Date.

            "Loan Group 1": The aggregate of the Mortgage Loans identified on
Schedule I as being included in Loan Group 1.

            "Loan Group 2": The aggregate of the Mortgage Loans identified on
Schedule I as being included in Loan Group 2.

            "Loan Group 3": The aggregate of the Mortgage Loans identified on
Schedule I as being included in Loan Group 3.

            "Loan Group 4": The aggregate of the Mortgage Loans identified on
Schedule I as being included in London Group 4.

            "Moody's": Moody's Investors Service, Inc., and its successors in
interest.

            "Mortgage Loans": The mortgage loans listed on Schedule I hereto.

            "Nat City": National City Mortgage Co., or any successor in
interest.

            "Net Rate": With respect to each Mortgage Loan, the interest rate of
such Mortgage Loan less the Administrative Cost Rate applicable to such Mortgage
Loan. For purposes of calculating the Certificate Rates of the Interests and
Certificates, the Net Rate of a Mortgage Loan will be calculated without regard
to any modification, waiver or amendment of the interest rate of the Mortgage
Loan, whether agreed to by any Servicer or resulting from a bankruptcy,
insolvency or similar proceeding involving the related Borrower.

111484 GSR 2004-7
Trust Agreement

                                       7

<PAGE>

            "Net WAC Rate": With respect to any Distribution Date and each Loan
Group, the per annum rate equal to a fraction (i) the numerator of which is the
sum, for each Mortgage Loan in such Loan Group, of the product of (x) the Net
Rate in effect for such Mortgage Loan as of the beginning of the related Due
Period and (y) the Scheduled Principal Balance of such Mortgage Loan as of the
beginning of the related Due Period (after taking into account scheduled
payments of principal on such date), and (ii) the denominator of which is the
aggregate Scheduled Principal Balance of the Mortgage Loans in such Loan Group
as of the beginning of the related Due Period.

            "Payoffs": Voluntary prepayments in full on a Mortgage Loan.

            "Prepayment Period": As to each Distribution Date, the preceding
calendar month.

            "Principal Payment Amount": For any Distribution Date and any Loan
Group, the sum, for all Mortgage Loans in such Loan Group, of the portion of
Scheduled Payments due on the Due Date immediately before the Distribution Date
that are allocable to principal on the Mortgage Loans in such Loan Group.

            "Principal Prepayment Amount": For any Distribution Date and any
Loan Group, the sum, for all of the Mortgage Loans in such Loan Group, of all
Payoffs and Curtailments that were received during the related Prepayment
Period.

            "Rating Agency": With respect to the Class 1A1, Class 1A2, Class
1A3, Class 2A1, Class 3A1, Class 4A1, and Class R Certificates, each of S&P and
Moody's, and with respect to the Class B1, Class B2, Class B3, Class B4 and
Class B5 Certificates, S&P.

            "Record Date": For any Distribution Date and any Class of
Certificates, the last Business Day of the related Interest Accrual Period.

            "Regular Certificates": The Senior Certificates (other than the
Class R Certificates) and the Subordinate Certificates.

            "Regular Interests": The REMIC I Regular Interests or the
Certificates (other than the Class R Certificates).

            "REMIC": REMIC I or REMIC II.

            "REMIC Interests": Each Class of Regular Interests, the Class R-I
Interest and the Class R-II Interest issued pursuant to Section 2.03(b) and (c).

            "REMIC I": One of the two real estate mortgage investment conduits
created in the Trust, the assets of which consist of the Mortgage Loan, REO
Property and certain other assets and the REMIC I Distribution Account.

            "REMIC I Regular Interests": The regular interests issued by REMIC
I, consisting of the Class I Interests.

111484 GSR 2004-7
Trust Agreement

                                       8

<PAGE>

            "REMIC I Subordinated Balance Ratio": The ratio among the principal
balances of the Class I-1B Interest, Class I-2B Interest, Class I-3B Interest
and Class I-4B Interest equal to the ratio among the Group Subordinate Amounts
for each of Loan Group 1, Loan Group 2, Loan Group 3 and Loan Group 4.

            "REMIC II": One of the two real estate mortgage investment conduits
created in the Trust, the assets of which consist of the Certificate Account and
the REMIC I Regular Interests.

            "REMIC II Regular Interests": The regular interests in REMIC II,
consisting of the Regular Certificates.

            "Remittance Date": The 18th day of each month, or if such day is not
a Business Day, either the next succeeding business day or the business day
immediately preceding such date, as set forth in the applicable Servicing
Agreement.

            "S&P": Standard & Poor's Ratings Services, a division of The
McGraw-Hill Companies, Inc., and its successors in interest.

            "Sale Agreement": Each of, (1) the Master Mortgage Loan Purchase
Agreement, dated as of November 1, 2003 by and between GSMC and Countrywide and
(2) the Amended and Restated Flow Seller's Warranties and Servicing Agreement
dated as of August 1, 2003 by and between GSMC and Nat City.

            "Scheduled Payment": For each Mortgage Loan, payments of interest
and principal scheduled to be paid on each Due Date in accordance with the terms
of related Mortgage Note.

            "Seller": Each of Countrywide and Nat City.

            "Senior Certificates": Collectively, the Class 1A1, Class 1A2, Class
1A3, Class 2A1, Class 3A1, Class 4A1 and Class R Certificates.

            "Senior Liquidation Amount": For any Distribution Date and any Loan
Group, will equal the aggregate, for each Mortgage Loan in such Loan Group that
became a Liquidated Mortgage Loan during the calendar month preceding the month
of that Distribution Date, of the lesser of (i) the applicable Senior Percentage
of the Scheduled Principal Balance of that Mortgage Loan and (ii) the applicable
Senior Prepayment Percentage of the Liquidation Principal derived from such
Mortgage Loan.

            "Senior Percentage": For any Distribution Date and any Loan Group,
will equal the lesser of (a) 100% and (b) the sum of the Class Principal
Balances (immediately before the Distribution Date) of the Senior Certificates
related to such Loan Group, divided by the aggregate Scheduled Principal Balance
of the Mortgage Loans in such Loan Group as of the beginning of the Due Period
related to such Distribution Date.

111484 GSR 2004-7
Trust Agreement

                                       9

<PAGE>

            "Senior Prepayment Amount": For any Distribution Date and any Loan
Group, the product of (i) the applicable Senior Prepayment Percentage and (ii)
the Principal Prepayment Amount for such Loan Group received during the related
Prepayment Period.

            "Senior Prepayment Percentage": For each Distribution Date and any
Loan Group, the applicable Senior Percentage for such Distribution Date, plus
the percentage of the Subordinate Percentage for such Loan Group identified
below for the period during which such Distribution Date occurs:

<TABLE>
<CAPTION>
                                                                                    PERCENT OF APPLICABLE
                          DISTRIBUTION DATE                                         SUBORDINATE PERCENTAGE
--------------------------------------------------------------------------------    ----------------------
<S>                                                                                 <C>
July 2004 through July 2011.....................................................            100%

July 2011 through June 2012.....................................................             70%
July 2012 through June 2013.....................................................             60%
July 2013 through June 2014.....................................................             40%
July 2014 through June 2015.....................................................             20%
July 2015 and thereafter........................................................              0%
</TABLE>

provided, however, that, on any Distribution Date, (i) if the Senior Percentage
for such Distribution Date exceeds the initial Senior Percentage as of the
Closing Date, then the Senior Prepayment Percentage for each Loan Group and that
Distribution Date will equal 100%; (ii) if before the Distribution Date in July
2007, (x) the combined Subordinate Percentage (for all Loan Groups) for such
Distribution Date is greater than or equal to twice the combined Subordinate
Percentage as of the Closing Date and (y) the aggregate amount of Realized
Losses realized on the Mortgage Loans in all Loan Groups are less than or equal
to 20% of the initial aggregate Class Principal Balance of the Subordinate
Certificates, then the Senior Prepayment Percentage for each Loan Group for such
Distribution Date will equal the Senior Percentage for such Loan Group plus 50%
of the Subordinate Percentage for that Distribution Date; and (iii) if on or
after the Distribution Date in July 2007, (x) the combined Subordinate
Percentage for such Distribution Date is greater than or equal to twice the
Subordinate percentage as of the Closing Date and (y) the aggregate amount of
Realized Losses realized on the Mortgage Loans in all of the Loan Groups are
less than or equal to 30% of the initial aggregate Class Principal Balance of
the Subordinate Certificates, then the Senior Prepayment Percentage for each
Loan Group for such Distribution Date will equal the Senior Percentage for such
Loan Group for such Distribution Date; provided, further, that if the
Delinquency/Loss Test is not satisfied as of such Distribution Date, the
Subordinate Percentage for each Loan Group used to calculate the Senior
Prepayment Percentage for the related Distribution Date shall equal 100%. If on
any Distribution Date the allocation to the Senior Certificates in the
percentage required would reduce the sum of the Class Principal Balances of the
Senior Certificates related to a Loan Group below zero, the Senior Prepayment
Percentage for such Distribution Date and such Loan Group shall be limited to
the percentage necessary to reduce such sum to zero.

            "Senior Principal Distribution Amount": For each Distribution Date
and each Loan Group, the sum of: (i) the applicable Senior Percentage of the
Principal Payment Amount for such Loan Group, (ii) the applicable Senior
Prepayment Percentage of the Principal

111484 GSR 2004-7
Trust Agreement

                                       10

<PAGE>

Prepayment Amount for such Loan Group, (iii) the Senior Liquidation Amount for
such Loan Group, (iv) Crossover Amounts (allocable to principal), if any,
received from the other Loan Groups and (v) the applicable Senior Prepayment
Percentage of any Subsequent Recoveries, with respect to the Mortgage Loans in
such Loan Group.

            "Servicer": Each of Countrywide Servicing and Nat City, and their
respective successors or assigns, in each case under the related Servicing
Agreement.

            "Servicing Agreement": Each of, (1) the Servicing Agreement, dated
as of November 1, 2003 by and between GSMC and Countrywide Servicing and (2) the
Amended and Restated Flow Seller's Warranties and Servicing Agreement, dated as
of August 1, 2003 by and between GSMC and Nat City.

            "Servicing Fee": With respect to each Distribution Date and each
Mortgage Loan, the aggregate amount payable to the Servicer with respect to such
Mortgage Loan, which amount payable is equal to one-twelfth of the applicable
Servicing Fee Rate multiplied by the Scheduled Principal Balance of such
Mortgage Loan as of the beginning of the Due Period related to such Distribution
Date.

            "Servicing Fee Rate": For each Mortgage Loan, the applicable per
annum rate listed on the Mortgage Loan Schedule.

            "Special Hazard Coverage": For each Distribution Date, an amount
equal to the greater of (i) the greatest of (A) the aggregate Scheduled
Principal Balance of Mortgage Loans related to Mortgaged Properties located in
the single California zip code area with the largest aggregate Scheduled
Principal Balance of related Mortgage Loans, (B) 0.57% of the aggregate
Scheduled Principal Balance of Mortgage Loans and (C) twice the Scheduled
Principal Balance of the largest single Mortgage Loan, in each case calculated
as of the Due Date in the immediately preceding month (or, in the case of the
first Distribution Date, as of the Cut-Off Date); and (ii) $6,998,366, minus
(iii) the aggregate amount of Special Hazard Losses allocated to the
Certificates on or prior to such Distribution Date; provided, however, that, in
no event may the Special Hazard Coverage be less than zero.

            "Special Hazard Loss": Any loss on a Mortgage Loan resulting from
(i) damage to the related Mortgaged Property caused by certain hazards
(including earthquakes and, to a limited extent, tidal waves and related water
damage) not insured against under the standard form of hazard insurance policy
for the state in which the related Mortgaged Property is located or under a
flood insurance policy if the Mortgaged Property is located in a federally
designated flood area, or (ii) the application of the coinsurance clause
contained in such hazard insurance policy; provided, however, that Special
Hazard Losses shall not include losses caused by war, civil insurrection, action
taken by governmental authority in hindering, combating or defending against an
actual, impending or expected attack, errors in design, faulty workmanship or
materials (unless the collapse of the property or a part thereof ensues, and
then only the ensuing loss shall be considered a Special Hazard Loss), nuclear
reaction, flood (if the Mortgaged Property is located in a federally designated
flood area) and chemical contamination.

111484 GSR 2004-7
Trust Agreement

                                       11

<PAGE>

            "Step 1 Assignment Agreements": Each of (i) the Assignment,
Assumption and Recognition Agreement by and among GSMC, the Depositor and
Countrywide dated as of June 1, 2004, (ii) the Assignment, Assumption and
Recognition Agreement by and among GSMC, the Depositor and Countrywide Servicing
dated as of June 1, 2004, and (iii) the Assignment, Assumption and Recognition
Agreement by and among GSMC, the Depositor and Nat City dated as of June 1,
2004.

            "Step 2 Assignment Agreements": Each of (i) Assignment, Assumption
and Recognition Agreement among the Depositor, the Trustee, Countrywide
Servicing and Countrywide dated as of June 1, 2004 and (ii) the Assignment,
Assumption and Recognition Agreement among the Depositor, the Trustee and Nat
City dated as of June 1, 2004.

            "Subordinate Certificates": The Class B Certificates.

            "Subordinate Percentage": For any Distribution Date and any Loan
Group, (x) 100%, minus (y) the Senior Percentage for such Loan Group.

            "Subordinate Principal Distribution Amount": For any Distribution
Date and any Loan Group, (x) the sum, for such Loan Group, of the Principal
Payment Amount, the Principal Prepayment Amount and the Liquidation Principal,
minus (y) the Senior Principal Distribution Amount for such Loan Group, minus,
(z) Crossover Amounts, if any, allocable to principal paid to the Senior
Certificates related to the other Loan Groups.

            "Subordination Levels": With respect to any Class of Subordinate
Certificates on any specified date, the percentage obtained by dividing the sum
of the Class Principal Balances of all Classes of Subordinate Certificates that
are subordinate to that Class by the sum of the Class Principal Balances of all
Classes of Certificates as of such date, before giving effect to distributions
and allocations of Realized Losses to the Certificates on such date.

            "Subsequent Recoveries": With respect to any Distribution Date and
any Mortgage Loan, amounts received in respect of principal on such Mortgage
Loan during the related Prepayment Period which have previously been allocated
as a Realized Loss to a Class of Certificates.

            "Trust Agreement": This Trust Agreement, dated as of June 1, 2004,
which incorporates by reference the Standard Terms. Any references in any
documents required hereunder, including references in documents within the
Trustee Mortgage Loan File, to a Trust Agreement dated as of June 1, 2004, shall
be deemed to refer to this Trust Agreement.

            "Trust Estate": As defined in Section 2.01 hereof.

            "Trustee": JPMorgan Chase, not in its individual capacity but solely
as Trustee under this Trust Agreement, or its successor in interest in such
capacity, or any successor trustee appointed as herein provided.

            "Undercollateralized Loan Group": As defined in Section 3.03.

111484 GSR 2004-7
Trust Agreement

                                       12

<PAGE>

                                   ARTICLE II

                FORMATION OF TRUST; CONVEYANCE OF MORTGAGE LOANS

            Section 2.01 Conveyance to the Trustee. To provide for the
distribution of the principal of and interest on the Certificates in accordance
with their terms, all of the sums distributable under this Trust Agreement with
respect to the Certificates and the performance of the covenants contained in
this Trust Agreement, the Depositor hereby bargains, sells, conveys, assigns and
transfers to the Trustee, in trust, without recourse and for the exclusive
benefit of the Holders of the Certificates, all of the Depositor's right, title
and interest in and to any and all benefits accruing to the Depositor from: (a)
the Mortgage Loans listed on Schedule I hereto, the related Trustee Mortgage
Loan Files, and all Scheduled Payments due thereon after the Cut-Off Date and
all principal prepayments collected with respect to the Mortgage Loans and paid
by a Borrower on or after the Cut-Off Date, and proceeds of the conversion,
voluntary or involuntary, of the foregoing; (b) the Sale Agreements (other than
GSMC's rights to indemnification thereunder, which were retained by GSMC under
the applicable Step 1 Assignment Agreements) and the Servicing Agreements, as
they relate to the Mortgage Loans; (c) the Custodial Agreements, as they relate
to the Mortgage Loans; (d) the Assignment Agreements; (e) the REMIC I
Distribution Account, the Certificate Account, and the Collection Accounts (as
they related to the Mortgage Loans) and (f) proceeds of all of the foregoing
(including, without limitation, all amounts, other than investment earnings,
from time to time held or invested in the Collection Account, the REMIC I
Distribution Account and the Certificate Account, whether in the form of cash,
instruments, securities or other property, all proceeds of any mortgage
insurance, mortgage guarantees, hazard insurance, or title insurance policy
relating to the Mortgage Loans, cash proceeds, accounts, accounts receivable,
notes, drafts, acceptances, chattel paper, checks, deposit accounts, rights to
payment of any and every kind, and other forms of obligations and receivables,
which at any time constitute all or part or are included in the proceeds of any
of the foregoing) to pay the Certificates as specified herein (items (a) through
(f) above shall be collectively referred to herein as the "Trust Estate").

            The foregoing sale, transfer, assignment, set-over and conveyance
does not and is not intended to result in the creation of an assumption by the
Trustee of any obligation of the Depositor, the Seller or any other person in
connection with the Mortgage Loans, the Sale Agreements, the Servicing
Agreements, the Assignment Agreements or under any agreement or instrument
relating thereto except as specifically set forth herein.

            It is agreed and understood by the Trustee and the Depositor that it
is not intended that any mortgage loan be included in the Trust that is a "High
Cost Home Loan" as defined in the New Jersey Home Ownership Act effective
November 27, 2003 and the New Mexico Home Loan Protection Act effective January
1, 2004.

            Section 2.02 Acceptance by the Trustee. By its execution of this
Trust Agreement, the Trustee acknowledges and declares that it holds and will
hold or has agreed to hold (in each case through the applicable Custodian) all
documents delivered to any such person from time to time with respect to the
Mortgage Loans and all assets included in the definition of "Trust Estate"
herein in trust for the exclusive use and benefit of all present and future
Holders of the Certificates. The Trustee has not created and will not create,
and no officer of the Trustee

111484 GSR 2004-7
Trust Agreement

                                       13

<PAGE>

has any actual knowledge or has received actual notice of, any interest in the
Trust Estate contrary to the interests created by the Trust Agreement. The
Trustee has not entered, nor intends to enter, into any subordination agreement
or intercreditor agreement with respect to any assets included in the Trust
Estate.


            Section 2.03 REMIC Elections and REMIC Designation.

            (a) REMIC Elections. Elections shall be made by the Trustee to treat
the assets of the Trust Estate described in the definition of the term "REMIC I"
and the assets of the Trust Estate described in the definition of the term
"REMIC II" as two separate REMICs for federal income tax purposes. The REMIC I
Regular Interests will constitute the regular interests in REMIC I and the
Regular Certificates will constitute the regular interests in REMIC II. The
Class R-I Interest will constitute the residual interest in REMIC I and the
Class R-II Interest will constitute the residual interest in REMIC II, each of
which will be represented by the Class R Certificates.

            (b) REMIC I Designations

            The pass-through rate with respect to the Class I-1B Interest and
Class I-1Q Interest shall be a per annum rate equal to the Net WAC Rate for Loan
Group 1. The pass-through rate with respect to the Class I-2B Interest and Class
I-2Q Interest shall be a per annum rate equal to the Net WAC Rate for Loan Group
2. The pass-through rate with respect to the Class I-3B Interest and Class I-3Q
Interest shall be a per annum rate equal to the Net WAC Rate for Loan Group 3.
The pass-through rate with respect to the Class I-4B and Class I-4Q Interest
shall be a per annum rate equal to the Net WAC Rate for Loan Group 4.

            As of the Closing Date and any date of determination, (i) the
principal balance of the Class I-1B Interest shall equal 0.10% of the Group
Subordinate Amount for Loan Group 1, (ii) the principal balance of the Class
I-2B Interest shall equal 0.10% of the Group Subordinate Amount for Loan Group
2, (iii) the principal balance of the Class I-3B Interest shall equal 0.10% of
the Group Subordinate Amount for Loan Group 3 and (iv) the principal balance of
the Class I-4B Interest shall equal 0.10% of the Group Subordinate Amount for
Loan Group 4.

            As of the Closing Date and any date of determination, (i) the
principal balance of the Class I-1Q Interest shall equal the excess of the
aggregate Scheduled Principal Balance of the Group 1 Mortgage Loans over the
principal balance of the Class I-1B Interest, (ii) the principal balance of the
Class I-2Q Interest shall equal the excess of the aggregate Scheduled Principal
Balance of the Group 2 Mortgage Loans (less $100 allocable to the Class R-1
Interest until paid pursuant to Section 3.01(a)(ii)) over the principal balance
of the Class I-2B Interest, (iii) the principal balance of the Class I-3Q
Interest shall equal the excess of the aggregate Scheduled Principal Balance of
the Group 3 Mortgage Loans over the principal balance of the Class I-3B Interest
and (iv) the principal balance of the I-4Q Interest shall equal the excess of
the aggregate Scheduled Principal Balance of the Group 4 Mortgage Loans over the
principal balance of the Class I-4B Interest..

            On each Distribution Date, prior to distributions on the
Certificates as provided in Section 3.01(a): (i) the Available Distribution
Amount (without regard to clauses (1)(g) and (3)

111484 GSR 2004-7
Trust Agreement

                                       14

<PAGE>

of the definition thereof) from Loan Group 1 shall be deemed distributed to the
Class I-1B Interest and Class I-1Q Interest, (ii) the Available Distribution
Amount (without regard to clauses (1)(g) and (3) of the definition thereof) from
Loan Group 2 (other than amounts paid to the Class R Certificates (in respect of
the Class R-I Interest) pursuant to Section 3.01) shall be deemed distributed to
the Class I-2B Interest and Class I-2Q Interest, (iii) the Available
Distribution Amount (without regard to clauses (1)(g) and (3) of the definition
thereof) from Loan Group 3 shall be deemed distributed to the Class I-3B
Interest and Class I-3Q Interest and (iv) the Available Distribution Amount
(without regard to clauses (1)(g) and (3) of the definition thereof) from Loan
Group 4 shall be deemed distributed to the Class I-4B Interest and Class I-4Q
Interest.

            Distributions of principal shall be made, and Realized Losses shall
be allocated:

            (i)   first, to the Class I-1B Interest, Class I-2B Interest, Class
      I-3B Interest and Class I-4B Interest each from the related Loan Group, so
      that their respective principal balances (computed to at least eight
      decimal places) are equal to (A) 0.10% of the Group Subordinate Amount for
      Loan Group 1, (B) 0.10% of the Group Subordinate Amount for Loan Group 2,
      (C) 0.10% of the Group Subordinate Amount for Loan Group 3 and (D) 0.10%
      of the Group Subordinate Amount for Loan Group 4, respectively (except
      that if any such amount is a larger number than in the preceding
      distribution period, the least amount of principal shall be distributed or
      losses shall be allocated to the Class I-1B Interest, Class I-2B Interest,
      Class I-3B Interest and Class I-4B Interest, as applicable, such that the
      REMIC I Subordinated Balance Ratio is maintained); and

            (ii)  second, any remaining amounts of principal shall be
      distributed and losses shall be allocated from the related Loan Group, to
      the Class I-1Q Interest, Class I-2Q Interest, Class I-3Q Interest and
      Class I-4Q Interest, respectively.

            (c)   REMIC II Designation. The REMIC shall issue each of the
following Classes of Certificates, each of which shall have the following
Certificate Rates and initial Class Principal Balances:

<TABLE>
<CAPTION>
                   INITIAL CLASS
  CLASS OF       PRINCIPAL BALANCE             INITIAL
CERTIFICATES        AMOUNT                CERTIFICATE RATE
------------     -----------------        ----------------
<S>              <C>                      <C>
Class 1A1         $  125,590,000              3.492%(1)
Class 1A2         $   12,560,000              3.492%(1)
Class 1A3         $  105,000,000              3.492%(1)
Class 2A1         $   99,089,000              4.191%(2)
Class 3A1         $  237,742,000              3.939%(3)
Class 4A1         $   96,059,000              4.873%(4)
Class B1          $   11,899,000              3.948%(5)
Class B2          $    4,899,000              3.948%(5)
Class B3          $    2,099,000              3.948%(5)
Class B4          $    2.100,000              3.948%(5)
Class B5          $    1,749,000              3.948%(5)
</TABLE>

111484 GSR 2004-7
Trust Agreement

                                       15

<PAGE>

<TABLE>
<CAPTION>
                   INITIAL CLASS
  CLASS OF       PRINCIPAL BALANCE             INITIAL
CERTIFICATES        AMOUNT                CERTIFICATE RATE
------------     -----------------        ----------------
<S>              <C>                      <C>
Class B6          $    1,050,537              3.948%(5)
Class R           $          100              4.191%(6)
</TABLE>

(1)   For each Distribution Date, the Certificate Rate for the Class 1A1, Class
      1A2 and Class 1A3 certificates will equal a per annum rate equal to the
      Net WAC Rate for Loan Group 1.

(2)   For each Distribution Date, the Certificate Rate for the Class 2A1
      Certificates will equal a per annum rate equal the Net WAC Rate for Loan
      Group 2.

(3)   For each Distribution Date, the Certificate Rate for the Class 3A1
      Certificates will equal the Net WAC Rate for Loan Group 3.

(4)   For each Distribution Rate, the Certificate Rate for the Class 4A1
      Certificates will equal the NET WAC Rate for Loan Group 4.

(5)   For each Distribution Date, the Certificate Rate for the Class B1, Class
      B2, Class B3, Class B4, Class B5 and Class B6 Certificates will equal the
      Net WAC Rate for all four Loan Groups, weighted on the basis of the
      related Group Subordinate Amount.

(6)   The Certificate Rate for the Class R Certificates will equal the Net WAC
      Rate for Loan Group 2. The Class R Certificates represent the aggregate
      residual interests of each REMIC.

            (d)   REMIC Final Scheduled Distribution. The "latest possible
maturity date" for each REMIC and each Class of Certificates and REMIC Regular
Interests is the June 2034 Distribution Date.

                                  ARTICLE III

                         REMITTING TO CERTIFICATEHOLDERS

            Section 3.01 Distributions to Certificateholders.

            (a)   Distributions. In accordance with Section 3.01(d) of the
Standard Terms and subject to the exceptions set forth below, on each
Distribution Date, the Trustee shall withdraw the aggregate Available
Distribution Amount (less any amounts withdrawn pursuant to Section 3.01(c) of
the Standard Terms) for Loan Group 1, Loan Group 2, Loan Group 3 and Loan Group
4 and shall distribute it in the following manner and order of priority:

            (i)   The Available Distribution Amount for Loan Group 1 shall be
      distributed in the following order of priority:

                  (1)   first, pro rata (based on their respective Accrued
            Certificate Interest), to the Class 1A1, Class 1A2 and Class 1A3,
            Accrued Certificate Interest thereon; and

                  (2)   second, pro rata (based on their respective Class
            Principal Balances), to Class 1A1, Class 1A2 and Class 1A3
            Certificates, as principal, up to

111484 GSR 2004-7
Trust Agreement

                                       16

<PAGE>

            the Senior Principal Distribution Amount for Loan Group 1, until the
            Class Principal Balances of each such class have been reduced to
            zero.

            (ii)  The Available Distribution Amount for Loan Group 2 shall be
      distributed as follows:

                  (1)   first, pro rata (based on their respective Accrued
            Certificate Interest) to the Class 2A1 and Class R Certificates,
            Accrued Certificate Interest thereon;

                  (2)   second, to Class R Certificates (in respect of the Class
            R-I Interest), as principal, up to the Senior Principal Distribution
            Amount for Loan Group 2, until the Class Principal Balance thereof
            has been reduced to zero; and

                  (3)   third, to the Class 2A1 Certificates, as principal, up
            to the Senior Principal Distribution Amount for Loan Group 2, until
            the Class Principal Balance thereof has been reduced to zero.

            (iii) The Available Distribution Amount for Loan Group 3 shall be
      distributed as follows:

                  (1)   first, to the Class 3A1 Certificates, Accrued
            Certificate Interest thereon;

                  (2)   second, to the Class 3A1 Certificates, as principal, up
            to the Senior Principal Distribution Amount for Loan Group 3 until
            the Class Principal Balance thereof has been reduced to zero;

            (iv)  The Available Distribution Amount for Loan Group 4 will be
      distributed:

                  (1)   first, to the Class 4A1 Certificates, Accrued
            Certificate Interest thereon; and

                  (2)   second, to the Class 4A1 Certificates, the Senior
            Principal Distribution Amount for Loan Group 4 until the Class
            Principal Balance thereof has been reduced to zero.

            (b)   Subject to the exceptions described below, unless the Class
Principal Balances of the applicable Class of Subordinate Certificates has been
previously reduced to zero, the portion of the Available Distribution Amount for
all of the Loan Group in the aggregate remaining after making the distributions
described above in paragraph (a) will be distributed in the following order of
priority:

            (i)   to the Class B1 Certificates, Accrued Certificate Interest on
      such Class;

            (ii)  to the Class B1 Certificates, as principal, their pro rata
      share (based on the Class Principal Balance thereof) of the Subordinate
      Principal Distribution Amount until the Class Principal Balance thereof
      has been reduced to zero;

111484 GSR 2004-7
Trust Agreement

                                       17

<PAGE>

            (iii) to the Class B2 Certificates, Accrued Certificate Interest on
      such Class;

            (iv)  to the Class B2 Certificates, as principal, their pro rata
      share (based on the Class Principal Balance thereof) of the Subordinate
      Principal Distribution Amount until the Class Principal Balance thereof
      has been reduced to zero;

            (v)   to the Class B3 Certificates, Accrued Certificate Interest on
      such Class;

            (vi)  to the Class B3 Certificates, as principal, their pro rata
      share (based on the Class Principal Balance thereof) of the Subordinate
      Principal Distribution Amount until the Class Principal Balance thereof
      has been reduced to zero;

            (vii) to the Class B4 Certificates, Accrued Certificate Interest on
      such Class;

            (viii) to the Class B4 Certificates, as principal, their pro rata
      share (based on the Class Principal Balance thereof) of the Subordinate
      Principal Distribution Amount until the Class Principal Balance thereof
      has been reduced to zero;

            (ix)  to the Class B5 Certificates, Accrued Certificate Interest on
      such Class;

            (x)   to the Class B5 Certificates, as principal, their pro rata
      share (based on the Class Principal Balance thereof) of the Subordinate
      Principal Distribution Amount until the Class Principal Balance thereof
      has been reduced to zero;

            (xi)  to the Class B6 Certificates, Accrued Certificate Interest on
      such Class;

            (xii) to the Class B6 Certificates, as principal, their pro rata
      share (based on the Class Principal Balance thereof) of the Subordinate
      Principal Distribution Amount until the Class Principal Balance thereof
      has been reduced to zero;

            (xiii) to each Class of Certificates in order of seniority (and
      among classes of Senior Certificates related to a Loan Group, pro rata,
      based on the amount of unreimbursed Realized Losses allocated to such
      Classes), up to the amount of unreimbursed Realized Losses allocated to
      that Class, if any (unless the allocation of Realized Losses has reduced
      any Class of Certificates to zero on a previous Distribution Date, in
      which case no amounts will be reimbursed to that Class); provided,
      however, that any amounts distributed pursuant to this paragraph (b)(xiii)
      will not cause a further reduction in the Class Principal Balance of any
      Class of Certificates; and

            (xiv) at such time as all other Classes of Certificates have been
      paid in full and all Realized Losses previously allocated have been
      reimbursed in full (unless the allocation of Realized Losses has reduced
      any Class of Certificates to zero on a previous Distribution Date, in
      which case no amounts will be reimbursed to that Class), all remaining
      amounts to the Residual Certificates with respect to the Class R-I
      Interest.

            (c)   Notwithstanding subsection (b) above, if the Subordination
Level for any Class of Subordinate Certificates on any Distribution Date is less
than the Subordination Level on the Closing Date for such Class of Certificates
(such Class, the "Affected Subordinate

111484 GSR 2004-7
Trust Agreement

                                       18

<PAGE>

Certificates"), the aggregate portion of the Principal Prepayment Amount
otherwise payable on such Distribution Date to Classes of Subordinate
Certificates will be allocated as follows:

            (i)   pro rata (based on their respective Class Principal Balances)
      to each Class of Subordinate Certificates whose Subordination Level equals
      or exceeds its initial Subordination Level and the class of Affected
      Subordinate Certificates having the lowest numerical designation, or

            (ii)  if no class of Subordinate Certificates has a Subordination
      Level equal to or in excess of its initial Subordination Level, to the
      Class of Affected Subordinate Certificates having the lowest numerical
      designation up to an amount sufficient to restore its Subordination Level
      to its initial Subordination Level, and then to the Class of Affected
      Subordinate Certificates having the next lowest numerical designation, in
      the same manner.

            (d)   All distributions or allocations made with respect to each
Class of Certificates on each Distribution Date shall be allocated pro rata
among the outstanding Certificates of such Class based on the outstanding
principal balance of each such Certificate. Payment shall be made either (1) by
check mailed to the address of each Certificateholder as it appears in the
Certificate Register on the Record Date immediately prior to such Distribution
Date or (2) with respect to the Regular Certificates, by wire transfer of
immediately available funds to the account of a Holder at a bank or other entity
having appropriate facilities therefor, if such Holder shall have so notified
the Trustee in writing by the Record Date immediately prior to such Distribution
Date and such Holder is the registered owner of Regular Certificates with an
initial principal amount of at least $1,000,000. The Trustee may charge the
Holder a fee for any payment made by wire transfer. Final distribution on the
Certificates will be made only upon surrender of the Certificates at the offices
of the Certificate Registrar set forth in the notice of such final distribution.

            (e)   Any amounts remaining in the Certificate Account on any
Distribution Date after all allocations and distributions required to be made by
this Trust Agreement have been made shall be paid to the Holders of the Class R
Certificates with respect to the related REMIC.

            Section 3.02 Allocation of Realized Losses and Shortfalls(a)
Realized Losses.

            (i)   On each Distribution Date, Realized Losses (other than Excess
      Special Losses) realized during the prior calendar month will be allocated
      to reduce the Class Principal Balances of the Subordinate Certificates in
      reverse numerical order, in each case until the Class Principal Balance of
      each such Class has been reduced to zero. If the Class Principal Balances
      of all of the Subordinate Certificates have been reduced to zero, further
      Realized Losses (other than Excess Special Losses) on the Mortgage Loans
      shall be allocated to the Senior Certificates related to the Loan Group in
      which such Realized Losses occurred based on their outstanding Class
      Principal Balances, in each case until the Class Principal Balance has
      been reduced to zero; provided, however, that Realized Losses (other than
      Excess Special Losses) otherwise allocable to the Class 1A1 Certificates
      shall be allocated to the Class 1A2 Certificates to reduce the Certificate

111484 GSR 2004-7
Trust Agreement

                                       19

<PAGE>

      Balance of such Class until such Certificate Balance has been reduced to
      zero, and thereafter such Realized Losses shall be allocated to the Class
      1A1 Certificates to reduce the Certificate Balance of such Class until
      such Certificate Balance has been reduced to zero.

            (ii)  On any Distribution Date, any Excess Special Losses that are
      realized during the prior calendar month will be allocated to all Classes
      of Senior Certificates related to the Loan Group in which such losses
      occurred, and the Subordinate Certificates pro rata, based on, with
      respect to such Classes of Senior Certificates, their respective Class
      Principal Balances and, with respect to the Subordinate Certificates, the
      related Group Subordinate Amount, respectively.

            (iii) Whenever Realized Losses or Excess Special Losses are required
      to be allocated to a Class of Certificates, the Realized Loss or Excess
      Special Loss shall be allocated to Certificates of such Class based on
      their respective outstanding principal amounts.

            (b)   Interest Shortfall. Notwithstanding anything in the Standard
Terms or this Trust Agreement to the contrary, on each Distribution Date, before
any distributions are made on the Certificates, Shortfall with respect to any
Mortgage Loan shall be allocated to reduce the Accrued Certificate Interest on
each Class of Senior Certificates related to the Loan Group of such Mortgage
Loan and each Class of Subordinate Certificates pro rata, based on the amount of
Interest otherwise owing to each such Class pursuant to clause (i) of the
definition of Accrued Certificate Interest.

            (c)   Modification Losses. Notwithstanding anything in the Standard
Terms or this Trust Agreement to the contrary, in the event that the Note Rate
on a Mortgage Loan is reduced as a result of a modification, waiver or amendment
of the terms of such Mortgage Loan, whether agreed to by any Servicer or
resulting from a bankruptcy, insolvency or similar proceeding involving the
related Borrower, such modification, waiver or amendment shall be disregarded
for purposes of calculating the Certificate Rate on any Class of Certificates.

            (d)   Subsequent Recoveries. With respect to any Subsequent
Recoveries received with respect to a Mortgage Loan, such Subsequent Recoveries
will be treated as a principal prepayment. In addition, the Class Principal
Balance of each Class of Certificates to which Realized Losses have been
allocated will be increased, sequentially in the order of payment priority, by
the amount of Subsequent Recoveries, but not by more than the amount of Realized
Losses previously allocated to reduce the Class Principal Balance of such Class.

            Section 3.03 Crossover Amounts.

            (a)   If, on any Distribution Date, the aggregate Class Principal
Balance of the Group 1, Group 2, Group 3 or Group 4 Certificates exceeds the
outstanding aggregate principal balance of the Mortgage Loans in the related
Loan Group (such class or classes, the "Affected Senior Certificates", such Loan
Group, the "Undercollateralized Loan Group"), then future principal payments
otherwise allocable to the Subordinate Certificates will be "crossed over" or
used to repay principal of the Affected Senior Certificates by increasing the
Senior Principal

111484 GSR 2004-7
Trust Agreement

                                       20

<PAGE>

Distribution Amount for the Loan Group related to the affected certificates in
an amount equal to the lesser of (i) the aggregate amount of principal otherwise
payable to the Subordinate Certificates on such Distribution Date and (ii) the
amount required to be paid to the Affected Senior Certificates so that their
aggregate Class Principal Balance is equal to the outstanding aggregate
principal balance of the Mortgage Loans in their related Loan Group. If on any
Distribution Date, there is more than one Undercollateralized Loan Group, the
distributions described above will be made in proportion to the amounts by which
the aggregate Class Principal Balance of the classes of Affected Senior
Certificates related to a Loan Group exceeds the principal balance of the
Mortgage Loans in such Loan Group.

            (b)   In addition, to the extent the Available Distribution Amount
for any Loan Group (without taking into account any cross-over payments from
other Loan Groups) is less than the interest and principal then distributable to
the related Senior Certificates, the remaining Available Distribution Amount for
the other Loan Groups (after payment of all amounts distributable to Senior
Certificates related to such Loan Groups) will be reduced pro rata by an
aggregate amount equal to such shortfall, and the amount of such reduction will
be added to the Available Distribution Amount of the Loan Group experiencing
such shortfall.

            (c)   In addition, if the aggregate Class Principal Balance of the
Group 1, Group 2, Group 3 or Group 4 Certificates has been reduced to zero and
such Senior Certificates are retired, amounts otherwise distributable as
principal on each class of Subordinate Certificates will instead be distributed
as principal to the Senior Certificates related to other Loan Groups which
remain outstanding, until the Class Principal Balances of the Subordinate
Certificates have been reduced to zero; provided, however, that either (a) the
Subordinate Percentage for the Loan Groups in the aggregate for that
Distribution Date is less than 200% of such Subordinate Percentage as of the
Cut-Off Date, or (b) the average outstanding principal balance of the Mortgage
Loans in the related Loan Group that are delinquent 60 days or more (including
Mortgage Loans in foreclosure or bankruptcy and REO properties) during the most
recent three calendar months as a percentage of the related Subordinate
Percentage is greater than or equal to 50%.

                                   ARTICLE IV

                                 THE SECURITIES

            Section 4.01 The Certificates. The Certificates will be designated
generally as the Mortgage Pass-Through Certificates, Series 2004-7. The
aggregate principal amount of Certificates that may be executed and delivered
under this Trust Agreement is limited to $699,836,637, except for Certificates
executed and delivered upon registration of transfer of, or in exchange for, or
in lieu of, other Certificates pursuant to Section 5.04 or 5.06 of the Standard
Terms. On the Closing Date, the Trustee shall execute, and the Certificate
Registrar shall authenticate and deliver Mortgage Pass-Through Certificates in
the names and amounts and to the Persons as directed by the Depositor. The table
in Section 2.03(d) sets forth the Classes of Certificates and the initial Class
Principal Balance for each Class of the Certificates.

            Section 4.02 Denominations. Each of the Senior Certificates and the
Senior Subordinate Certificates shall be issued in fully-registered, book-entry
form and shall be Book-

111484 GSR 2004-7
Trust Agreement

                                       21

<PAGE>

Entry Certificates. The Senior Certificates shall be issued in minimum
denominations of $25,000 initial certificate principal balance each and
multiples of $1 in excess thereof. The Subordinate Certificates will be issued
in minimum denominations of $250,000 initial certificate principal balance each
and multiples of $1 in excess thereof. In addition, one certificate of each
Class (other than the Class R Certificates) may be issued evidencing the sum of
an authorized denomination thereof and the remainder of the aggregate initial
Class Principal Balance of such Class. The Class R Certificates will be issued
in a percentage interest of 100%. Each of the Class R Certificates and the
Junior Subordinate Certificates shall be issued in fully-registered,
certificated form.

            Section 4.03 Redemption of Certificates. Notwithstanding anything to
the contrary in Section 9.02 of the Standard Terms, the obligations created by
the Trust Agreement will terminate upon payment to the Certificateholders of all
amounts held in the Collection Account, the Certificate Account and the REMIC I
Distribution Account required to be paid to the Certificateholders pursuant to
the Trust Agreement, following the earlier of: (i) the final payment or other
liquidation (or any Advance with respect thereto) of the last Mortgage Loan
remaining in the Trust or the disposition of all property acquired upon
foreclosure of any such Mortgage Loan and (ii) the repurchase of all of the
assets of the Trust by Countrywide Servicing upon the date on which the
aggregate Scheduled Principal Balance of the Mortgage Loans is equal to or less
than 10% of the aggregate Scheduled Principal Balance of such Mortgage Loans as
of the Cut-Off Date (and if not exercised by Countrywide Servicing within a
period of five Business Days from the first date on which such condition is
satisfied, by the Depositor). Written notice of termination shall be given to
each Certificateholder, and the final distribution shall be made only upon
surrender and cancellation of the Certificates at an office or agency appointed
by the Trustee which will be specified in the notice of termination. Any
repurchase of the assets of the Trust pursuant to this Section 4.03 shall be
made at a price equal to the Termination Price.

            Section 4.04 Securities Laws Restrictions. Each of the Class B4,
Class B5 and Class B6 Certificates is a Class of Junior Subordinate Certificates
subject to the restrictions on transfer contained in Section 5.05(a) of the
Standard Terms. The Class R Certificates are Residual Certificates subject to
Section 5.05(c) of the Standard Terms.

                                   ARTICLE V

                            MISCELLANEOUS PROVISIONS

            Section 5.01 Request for Opinions. (a) The Depositor hereby requests
and authorizes McKee Nelson LLP, as its special counsel in this transaction, to
issue on behalf of the Depositor such legal opinions to the Trustee and each
Rating Agency as may be (i) required by any and all documents, certificates or
agreements executed in connection with the Trust, or (ii) requested by the
Trustee, and Rating Agency or their respective counsels.

            (b)   The Trustee hereby requests and authorizes its counsel to
issue on its behalf such legal opinions to the Depositor, GSMC and Goldman,
Sachs & Co. as may be required by any and all documents, certificates or
agreements executed in connection with the establishment of the Trust and the
issuance of the Certificates.

111484 GSR 2004-7
Trust Agreement

                                       22

<PAGE>

            Section 5.02 Schedules and Exhibits. Each of the Schedules and
Exhibits attached hereto or referenced herein are incorporated herein by
reference as contemplated hereby and by the Standard Terms. Each Class of
Certificates shall be in substantially the form attached hereto, as set forth in
the Exhibit index.

            Section 5.03 Governing Law. THIS TRUST AGREEMENT SHALL BE GOVERNED
BY, AND ITS PROVISIONS CONSTRUED IN ACCORDANCE WITH, THE LAWS OF THE STATE OF
NEW YORK.

            Section 5.04 Counterparts. This Trust Agreement may be executed in
any number of counterparts, each of which so executed shall be deemed to be an
original but all of such counterparts shall together constitute but one and the
same instrument.

            Section 5.05 Notices. All demands and notices hereunder shall be in
writing and shall be deemed to have been duly given if personally delivered at
or mailed by first class mail, postage prepaid, or by express delivery service,
to (a) in the case of the Depositor, 85 Broad Street, New York, New York 10004,
Attention: President (telecopy number (212) 902-3000 and email addresses:
howard.altarescu@gs.com and nia.gandy@gs.com) or such other address, telecopy
number or email address as may hereafter be furnished to each party to the Trust
Agreement in writing by the Depositor, (b) in the case of the Trustee, 4 New
York Plaza, 6th Floor, New York, New York 10004, Attention: Global Debt Services
or such other address or telecopy number as may hereafter be furnished to each
party to the Trust Agreement in writing by the Trustee. The addresses of the
rating agencies required to be stated herein pursuant to Section 11.08(c) of the
Standard Terms is Moody's Investors Service, Inc., 99 Church Street, 8th Floor,
New York, New York 10007, and Standard & Poor's Ratings Services, 55 Water
Street, 40th Floor, New York, New York 10041.

                            [Signature page follows]

111484 GSR 2004-7
Trust Agreement

                                       23

<PAGE>

      IN WITNESS WHEREOF, the Depositor, the Trustee and Custodian have caused
this Trust Agreement to be duly executed by their respective officers thereunto
duly authorized and their respective signatures duly attested all as of the day
and year first above written.

                                 GS MORTGAGE SECURITIES CORP.,
                                       as Depositor

                                 By: /s/ Howard Altarescu
                                     -------------------------------------------
                                     Name: Howard Altarescu
                                     Title: Vice President

                                 JPMORGAN CHASE BANK
                                     not in its individual capacity, but solely
                                     in its capacity as Trustee and Custodian

                                 By: /s/ Thomas Venusti
                                     -------------------------------------------
                                     Name: Thomas Venusti
                                     Title: Assistant Vice President

111484 GSR 2004-7
Trust Agreement

<PAGE>

STATE OF NEW YORK      )
                       )   ss.:
COUNTY OF NEW YORK     )

            The foregoing instrument was acknowledged before me in the County of
New York, this ___ day of June 2004, by _____________, a ____________ for GS
Mortgage Securities Corp., a Delaware corporation, on behalf of the corporation.

                                              ----------------------------------
                                                        Notary Public

My Commission expires:

111484 GSR 2004-7
Trust Agreement

<PAGE>

STATE OF NEW YORK      )
                       )   ss.:
COUNTY OF NEW YORK     )

            The foregoing instrument was acknowledged before me in the County of
New York, this ___ day of June 2004, by _______________, a ___________ of
JPMorgan Chase Bank, on behalf of the company.

                                              ----------------------------------
                                                        Notary Public

My Commission expires:

111484 GSR 2004-7
Trust Agreement
<PAGE>

                                   SCHEDULE I

                                 MORTGAGE LOANS

111484 GSR 2004-7
Trust Agreement

                                      S-I-1
<PAGE>

                                   EXHIBIT 1A1

                          FORM OF CLASS 1A1 CERTIFICATE

                     GS MORTGAGE SECURITIES CORP., DEPOSITOR
                MORTGAGE PASS-THROUGH CERTIFICATES, SERIES 2004-7
                              CLASS 1A1 CERTIFICATE

UNLESS THIS CERTIFICATE IS PRESENTED BY AN AUTHORIZED REPRESENTATIVE OF THE
DEPOSITORY TRUST COMPANY, A NEW YORK CORPORATION ("DTC"), TO THE TRUSTEE OR ITS
AGENT FOR REGISTRATION OF TRANSFER, EXCHANGE, OR PAYMENT, AND ANY CERTIFICATE
ISSUED IS REGISTERED IN THE NAME OF CEDE & CO. OR IN SUCH OTHER NAME AS IS
REQUESTED BY AN AUTHORIZED REPRESENTATIVE OF DTC (AND ANY PAYMENT MADE TO CEDE &
CO. OR TO SUCH OTHER ENTITY AS IS REQUESTED BY AN AUTHORIZED REPRESENTATIVE OF
DTC), ANY TRANSFER, PLEDGE, OR OTHER USE HEREOF FOR VALUE OR OTHERWISE BY OR TO
ANY PERSON IS WRONGFUL INASMUCH AS THE REGISTERED OWNER HEREOF, CEDE & CO., HAS
AN INTEREST HEREIN.

THIS CLASS 1A1 CERTIFICATE REPRESENTS A REMIC REGULAR INTEREST FOR FEDERAL
INCOME TAX PURPOSES.

THE PRINCIPAL OF THIS CLASS 1A1 CERTIFICATE IS SUBJECT TO PREPAYMENT FROM TIME
TO TIME WITHOUT SURRENDER OF OR NOTATION ON THIS CERTIFICATE. ACCORDINGLY, THE
CERTIFICATE PRINCIPAL BALANCE OF THIS CERTIFICATE MAY BE LESS THAN THAT SET
FORTH BELOW. ANYONE ACQUIRING THIS CERTIFICATE MAY ASCERTAIN ITS CURRENT
CERTIFICATE PRINCIPAL BALANCE BY INQUIRY OF THE TRUSTEE.

111484 GSR 2004-7
Trust Agreement

                                      1A1-1
<PAGE>

                     GS MORTGAGE SECURITIES CORP., DEPOSITOR
                MORTGAGE PASS-THROUGH CERTIFICATES, SERIES 2004-7
                              CLASS 1A1 CERTIFICATE

INITIAL CERTIFICATE RATE            APPROXIMATE AGGREGATE INITIAL CERTIFICATE
PER ANNUM:  3.492%(1)               PRINCIPAL BALANCE OF THE CLASS 1A1
                                    CERTIFICATES AS OF THE CLOSING DATE:
                                    $125,590,000

PERCENTAGE INTEREST:  100%

MINIMUM DENOMINATION:               $25,000 AND $1 IN EXCESS OF $25,000

DATE OF THE TRUST                   APPROXIMATE AGGREGATE SCHEDULED PRINCIPAL
AGREEMENT:                          BALANCE AS OF THE CUT-OFF DATE OF THE
JUNE 1, 2004                        MORTGAGE LOANS HELD BY THE TRUST:
                                    $699,836,637

CLOSING DATE:                       SERVICERS:
JUNE 30, 2004                       COUNTRYWIDE HOME LOANS SERVICING LP
                                    NATIONAL CITY MORTGAGE CO.

FIRST DISTRIBUTION DATE:
JULY 26, 2004

FINAL SCHEDULED                     TRUSTEE: JPMORGAN CHASE BANK
DISTRIBUTION DATE:                  CUSTODIAN: JPMORGAN CHASE BANK
JUNE 25, 2034

NO. 1                               CUSIP NUMBER: 36228F 4P 8
                                    ISIN NUMBER: US36228F4P85

---------
(1) For each Distribution Date, the Certificate Rate for the Class 1A1
Certificates will equal a variable rate determined in accordance with the Trust
Agreement.

111484 GSR 2004-7
Trust Agreement

                                     1A1-2
<PAGE>

                     GS MORTGAGE SECURITIES CORP., DEPOSITOR
                MORTGAGE PASS-THROUGH CERTIFICATES, SERIES 2004-7
                              CLASS 1A1 CERTIFICATE

      evidencing a beneficial ownership interest in a Trust consisting of the
      entire beneficial ownership of a pool of certain hybrid adjustable-rate
      single family, fully amortizing, first lien Mortgage Loans formed and sold
      by

                          GS MORTGAGE SECURITIES CORP.

THIS CERTIFICATE DOES NOT REPRESENT AN OBLIGATION OF, OR INTEREST IN, AND IS NOT
GUARANTEED BY, GS MORTGAGE SECURITIES CORP., THE SERVICERS, THE TRUSTEE, THE
CUSTODIAN OR ANY OF THEIR AFFILIATES. NEITHER THIS CERTIFICATE NOR THE
UNDERLYING MORTGAGE LOANS ARE GUARANTEED BY ANY AGENCY OR INSTRUMENTALITY OF THE
UNITED STATES.

THIS CERTIFIES THAT:

                                   CEDE & CO.

is the registered owner of the Percentage Interest evidenced by this Certificate
in the Class 1A1 Certificates (the "Class 1A1 Certificates") issued by the trust
(the "Trust") created pursuant to a Trust Agreement, dated as specified above
(the "Trust Agreement"), between GS Mortgage Certificates Corp., as depositor
(hereinafter the "Depositor," which term includes any successor entity under the
Trust Agreement) and JPMorgan Chase Bank, as trustee (in such capacity, the
"Trustee") and custodian (in such capacity, the "Custodian"), a summary of
certain of the pertinent provisions of which is set forth hereafter. The Trust
consists primarily of a pool of Mortgage Loans. This Certificate is issued under
and is subject to the terms, provisions and conditions of the Trust Agreement
and also is subject to certain terms and conditions set forth in the Sale
Agreements and the Servicing Agreements, to which the Sale Agreements and the
Servicing Agreements the Holder of this Certificate, by virtue of the acceptance
hereof assents and by which such Certificateholder is bound.

         Distributions on this Certificate (including the final distribution on
this Certificate) will be made out of the related Available Distribution Amount,
to the extent and subject to the limitations set forth in the Trust Agreement,
on the 25th day of each month, or if such day is not a Business Day, the next
succeeding Business Day, beginning in June 2004 (each, a "Distribution Date"),
commencing on the first Distribution Date specified above, to the Person in
whose name this Certificate is registered at the close of business on the last
Business Day of the Interest Accrual Period related to such Distribution Date
(the "Record Date"). Distributions on this Certificate will generally be made
from collections on Mortgage Loans. All sums distributable on this Certificate
are payable in the coin or currency of the United States of America as at the
time of payment is legal tender for the payment of public and private debts.

         Distributions on this Certificate will be paid in accordance with the
terms of the Trust Agreement, the Sale Agreements and the Servicing Agreements.
Distributions allocated to

111484 GSR 2004-7
Trust Agreement

                                     1A1-3
<PAGE>

this Certificate on any Distribution Date will be an amount equal to this
Certificate's Percentage Interest of the related Available Distribution Amount
to be distributed on this Class of Certificates as of such Distribution Date,
with a final distribution to be made upon retirement of this Certificate as set
forth in the Trust Agreement.

         This Certificate is one of a duly authorized issue of Certificates
designated as Mortgage Pass-Through Certificates, Series 2004-7 (herein called
the "Certificates"), and representing a Percentage Interest in the Class of
Certificates specified on the face hereof equal to the quotient, expressed as a
percentage, obtained by dividing the denomination of this Certificate specified
on the face hereof by the aggregate Certificate Principal Balance of all the
Class 1A1 Certificates. The Certificates are issued in multiple Classes
designated as specifically set forth in the Trust Agreement. The Certificates
will evidence in the aggregate 100% of the beneficial ownership of the Trust.

         Realized Losses and interest shortfalls on the Mortgage Loans shall be
allocated among the Classes of Certificates on the applicable Distribution Date
in the manner set forth in the Trust Agreement. To the extent provided in the
Trust Agreement, with respect to Realized Losses and interest shortfalls, the
Subordinate Certificates will be subordinated to the Senior Certificates and
each of the Subordinate Certificates will be subordinated to each of the other
Subordinate Certificates with a lower numerical class designation, if any. All
Realized Losses and interest shortfalls on the Mortgage Loans allocated to any
Class of Certificates will be allocated pro rata among the outstanding
Certificates of such Class, as described in the Trust Agreement.

         The Certificates are limited in right of payment to certain collections
and recoveries respecting the Mortgage Loans, all as more specifically set forth
in the Trust Agreement. As provided in the Trust Agreement, withdrawals from the
Collection Accounts, the Certificate Account and related accounts shall be made
from time to time for purposes other than distributions to Holders, such
purposes including reimbursement of Advances made, or certain expenses incurred,
with respect to the Mortgage Loans and administration of the Trust.

         All distributions or allocations made with respect to each Class on any
Distribution Date shall be allocated in accordance with the Trust Agreement.
Payment shall be made either (1) by check mailed to the address of each
Certificateholder as it appears in the Certificate Register on the Record Date
immediately prior to such Distribution Date or (2) with respect to the
Certificates other than the Residual Certificates, by wire transfer of
immediately available funds to the account of a Certificateholder at a bank or
other entity having appropriate facilities therefor, if such Certificateholder
shall have so notified the Trustee in writing by the Record Date immediately
prior to such Distribution Date and such Certificateholder is the registered
owner of an initial Certificate Principal Balance or Notional Amount of at least
$1,000,000. The Trustee may charge the Certificateholder a fee for any payment
made by wire transfer. Final distribution on the Certificates will be made only
upon surrender of the Certificates at the offices of the Certificate Registrar
set forth in the notice of such final distribution.

         The Trust Agreement permits, with certain exceptions therein provided,
the amendment thereof and the modification of the rights and obligations of the
Depositor, the

111484 GSR 2004-7
Trust Agreement

                                     1A1-4
<PAGE>

Trustee and the Custodian and the rights of the Certificateholders under the
Trust Agreement at any time by the Depositor, the Trustee and the Custodian with
the consent of the Certificateholders entitled to at least 51% of the Voting
Rights. Any such consent by the Holder of this Certificate shall be conclusive
and binding on such Certificateholder and upon all future Holders of this
Certificate and of any Certificate issued upon the transfer hereof or in
exchange herefor or in lieu hereof whether or not notation of such consent is
made upon this Certificate. The Trust Agreement also permits the amendment
thereof, in certain limited circumstances, without the consent of the
Certificateholders.

         The Certificates are issuable in fully registered form only, without
coupons, in denominations specified in the Trust Agreement. As provided in the
Trust Agreement and subject to any limitations on transfer of this Certificate
by a Depository or its nominee and certain limitations set forth in the Trust
Agreement, the transfer of this Certificate is registrable in the Certificate
Register upon surrender of this Certificate for registration of transfer at the
principal Corporate Trust Office of the Trustee or such other offices or
agencies appointed by the Trustee for that purpose and such other locations
provided in the Trust Agreement, duly endorsed by or accompanied by an
assignment in the form below or other written instrument of transfer in form
satisfactory to, the Trustee and the Certificate Registrar duly executed by the
Certificateholder hereof, or such Certificateholder's attorney duly authorized
in writing, and thereupon one or more new Certificates of the same Class in the
same aggregate Certificate Principal Balance will be issued to the designated
transferee or transferees.

         As provided in the Trust Agreement and subject to certain limitations
therein set forth, this Certificate is exchangeable for a new Certificate of the
same Class in the same denomination. No service charge will be made for any such
registration of transfer or exchange, but the Trustee may require payment of a
sum sufficient to cover any tax or other governmental charge that may be imposed
in connection with any transfer or exchange of Certificates.

         The Depositor, the Trustee, the Custodian and the Certificate Registrar
and any agent of the Depositor, the Trustee, the Custodian or the Certificate
Registrar may treat the Person in whose name this Certificate is registered as
the owner hereof for all purposes, and none of the Depositor, the Trustee, the
Custodian, the Certificate Registrar or any such agent shall be affected by
notice to the contrary.

         The obligations created by the Trust Agreement will terminate upon
payment to the Certificateholders of all amounts held in the Collection Accounts
and the Certificate Account required to be paid to the Certificateholders
pursuant to the Trust Agreement, following the earlier of: (i) the final payment
or other liquidation (or any advance with respect thereto) of the last Mortgage
Loan remaining in the Trust or the disposition of all property acquired upon
foreclosure of any such Mortgage Loan and (ii) the repurchase of all the assets
of the Trust by Countrywide Home Loans Servicing LP or the Depositor, in
accordance with the Trust Agreement when the aggregate Scheduled Principal
Balance of the Mortgage Loans equals 10% or less of the aggregate Scheduled
Principal Balance of the Mortgage Loans as of the Cut-Off Date. Written notice
of termination will be given to each Certificateholder, and the final
distribution will be made only upon surrender and cancellation of the
Certificates at an office or agency appointed by the Trustee which will be
specified in the notice of termination.

111484 GSR 2004-7
Trust Agreement

                                     1A1-5
<PAGE>

         Any such repurchase of Mortgage Loans and property acquired in respect
of the Mortgage Loans shall be made at the Termination Price.

         Unless the certificate of authentication hereon has been executed by
the Certificate Registrar, by manual signature, this Certificate shall not be
entitled to any benefit under the Trust Agreement or be valid for any purpose.

         THIS CERTIFICATE AND THE TRUST AGREEMENT SHALL BE CONSTRUED IN
ACCORDANCE WITH, AND GOVERNED BY, THE LAWS OF THE STATE OF NEW YORK.

         The Trustee has executed this Certificate on behalf of the Trust as
Trustee under the Trust Agreement, and the Trustee shall be liable hereunder
only in respect of the assets of the Trust.

         Capitalized terms used herein and not defined herein shall have the
meaning assigned to them in the Trust Agreement.

         In the event that the terms of this Certificate conflict with the terms
of the Trust Agreement, the terms of the Trust Agreement shall control.

111484 GSR 2004-7
Trust Agreement

                                     1A1-6
<PAGE>

         IN WITNESS WHEREOF, the Trustee has caused this Certificate to be duly
executed.

Dated:   June 30, 2004                 JPMORGAN CHASE BANK,
                                           not in its individual capacity but
                                           solely as Trustee

                                       By: ____________________________________
                                           AUTHORIZED OFFICER

                          CERTIFICATE OF AUTHENTICATION

THIS IS ONE OF THE CLASS 1A1 CERTIFICATES REFERRED TO IN THE WITHIN-MENTIONED
TRUST AGREEMENT.

                                       JPMORGAN CHASE BANK,
                                           as Certificate Registrar

                                       By: _____________________________________
                                           AUTHORIZED OFFICER

111484 GSR 2004-7
Trust Agreement

                                     1A1-7
<PAGE>

                                  ABBREVIATIONS

The following abbreviations, when used in the inscription on the face of this
Certificate, shall be construed as though they were written out in full
according to applicable laws or regulations:

<TABLE>
<S>                                                <C>
TEN COM -- as tenants in common                    UNIF GIFT MIN ACT-- ______Custodian__________
TEN ENT -- as tenants by the                                             (Cust)        (Minor)
   entireties

JT TEN -- as joint tenants with rights             Under Uniform Gifts to Minors Act______________
 of survivorship and not as Tenants in Common                                          (State)
</TABLE>

                    Additional abbreviations may also be used
                          though not in the above list.

111484 GSR 2004-7
Trust Agreement

                                     1A1-8
<PAGE>

                                FORM OF TRANSFER

FOR VALUE RECEIVED, the undersigned hereby sells, assigns and transfers unto

________________________________________________________________________________

PLEASE INSERT SOCIAL SECURITY OR
OTHER IDENTIFYING NUMBER OF
ASSIGNEE _______________________________________________________________________

________________________________________________________________________________

            (Please print or typewrite name and address of assignee)

the within Certificate and does hereby irrevocably constitute and,
appoint___________ (Attorney) to transfer the said Certificate in the
Certificate Register of the within-named Trust, with full power of substitution
in the premises.

Dated: _____________________       ____________________________________________

                                   NOTICE: The signature to this assignment
                                   must correspond with the name as written
                                   upon the face of this certificate in every
                                   particular without alteration or enlargement
                                   or any change whatever.

________________________________

SIGNATURE GUARANTEED: The signature must be
guaranteed by a commercial bank or trust
company or by a member firm of the New York
Stock Exchange or another national
certificates exchange. Notarized or
witnessed signatures are not acceptable.

111484 GSR 2004-7
Trust Agreement

                                      1A1-9
<PAGE>

                            DISTRIBUTION INSTRUCTIONS

The assignee should include the following for purposes of distribution:

Distribution shall be made, by wire transfer or otherwise, in immediately
available funds, to ___________________________, for the account of
_____________________, account number _________________, or if mailed by check
to ______________________________. Applicable reports and statements should be
mailed to __________________________. This information is provided by
____________________________, the assignee named above, or _______________, as
agent

111484 GSR 2004-7
Trust Agreement

                                     1A1-10
<PAGE>

                                   EXHIBIT 1A2

                          FORM OF CLASS 1A2 CERTIFICATE

                     GS MORTGAGE SECURITIES CORP., DEPOSITOR
                MORTGAGE PASS-THROUGH CERTIFICATES, SERIES 2004-7
                              CLASS 1A2 CERTIFICATE

UNLESS THIS CERTIFICATE IS PRESENTED BY AN AUTHORIZED REPRESENTATIVE OF THE
DEPOSITORY TRUST COMPANY, A NEW YORK CORPORATION ("DTC"), TO THE TRUSTEE OR ITS
AGENT FOR REGISTRATION OF TRANSFER, EXCHANGE, OR PAYMENT, AND ANY CERTIFICATE
ISSUED IS REGISTERED IN THE NAME OF CEDE & CO. OR IN SUCH OTHER NAME AS IS
REQUESTED BY AN AUTHORIZED REPRESENTATIVE OF DTC (AND ANY PAYMENT MADE TO CEDE &
CO. OR TO SUCH OTHER ENTITY AS IS REQUESTED BY AN AUTHORIZED REPRESENTATIVE OF
DTC), ANY TRANSFER, PLEDGE, OR OTHER USE HEREOF FOR VALUE OR OTHERWISE BY OR TO
ANY PERSON IS WRONGFUL INASMUCH AS THE REGISTERED OWNER HEREOF, CEDE & CO., HAS
AN INTEREST HEREIN.

THIS CLASS 1A2 CERTIFICATE IS SUBORDINATED TO THE EXTENT DESCRIBED HEREIN AND IN
THE TRUST AGREEMENT REFERENCED HEREIN.

THIS CLASS 1A2 CERTIFICATE REPRESENTS A REMIC REGULAR INTEREST FOR FEDERAL
INCOME TAX PURPOSES.

THE PRINCIPAL OF THIS CLASS 1A2 CERTIFICATE IS SUBJECT TO PREPAYMENT FROM TIME
TO TIME WITHOUT SURRENDER OF OR NOTATION ON THIS CERTIFICATE. ACCORDINGLY, THE
CERTIFICATE PRINCIPAL BALANCE OF THIS CERTIFICATE MAY BE LESS THAN THAT SET
FORTH BELOW. ANYONE ACQUIRING THIS CERTIFICATE MAY ASCERTAIN ITS CURRENT
CERTIFICATE PRINCIPAL BALANCE BY INQUIRY OF THE TRUSTEE.

111484 GSR 2004-7
Trust Agreement

                                      1A2-1
<PAGE>

                     GS MORTGAGE SECURITIES CORP., DEPOSITOR
                MORTGAGE PASS-THROUGH CERTIFICATES, SERIES 2004-7
                              CLASS 1A2 CERTIFICATE

INITIAL CERTIFICATE RATE               APPROXIMATE AGGREGATE INITIAL CERTIFICATE
PER ANNUM:  3.492%(2)                  PRINCIPAL BALANCE OF THE CLASS 1A2
                                       CERTIFICATES AS OF THE CLOSING DATE:
                                       $12,560,000

PERCENTAGE INTEREST:  100%

MINIMUM DENOMINATION:                  $25,000 AND $1 IN EXCESS OF $25,000

DATE OF THE TRUST                      APPROXIMATE AGGREGATE SCHEDULED PRINCIPAL
AGREEMENT:                             BALANCE AS OF THE CUT-OFF DATE OF THE
JUNE 1, 2004                           MORTGAGE LOANS HELD BY THE TRUST:
                                       $699,836,637

CLOSING DATE:                          SERVICERS:
JUNE 30, 2004                          COUNTRYWIDE HOME LOANS SERVICING LP
                                       NATIONAL CITY MORTGAGE CO.

FIRST DISTRIBUTION DATE:
JULY 26, 2004

FINAL SCHEDULED                        TRUSTEE:  JPMORGAN CHASE BANK
DISTRIBUTION DATE:                     CUSTODIAN:  JPMORGAN CHASE BANK
JUNE 25, 2034

NO. 1                                  CUSIP NUMBER: 36228F 5Q 5
                                       ISIN NUMBER: US36228F5Q59

--------------
(2) For each Distribution Date, the Certificate Rate for the Class 1A2
Certificates will equal a variable rate determined in accordance with the Trust
Agreement.

111484 GSR 2004-7
Trust Agreement

                                     1A2-2
<PAGE>

                     GS MORTGAGE SECURITIES CORP., DEPOSITOR
                MORTGAGE PASS-THROUGH CERTIFICATES, SERIES 2004-7
                              CLASS 1A2 CERTIFICATE

      evidencing a beneficial ownership interest in a Trust consisting of the
      entire beneficial ownership of a pool of certain hybrid adjustable-rate
      single family, fully amortizing, first lien Mortgage Loans formed and sold
      by

                          GS MORTGAGE SECURITIES CORP.

THIS CERTIFICATE DOES NOT REPRESENT AN OBLIGATION OF, OR INTEREST IN, AND IS NOT
GUARANTEED BY, GS MORTGAGE SECURITIES CORP., THE SERVICERS, THE TRUSTEE, THE
CUSTODIAN OR ANY OF THEIR AFFILIATES. NEITHER THIS CERTIFICATE NOR THE
UNDERLYING MORTGAGE LOANS ARE GUARANTEED BY ANY AGENCY OR INSTRUMENTALITY OF THE
UNITED STATES.

THIS CERTIFIES THAT:

                                   CEDE & CO.

is the registered owner of the Percentage Interest evidenced by this Certificate
in the Class 1A2 Certificates (the "Class 1A2 Certificates") issued by the trust
(the "Trust") created pursuant to a Trust Agreement, dated as specified above
(the "Trust Agreement"), between GS Mortgage Certificates Corp., as depositor
(hereinafter the "Depositor," which term includes any successor entity under the
Trust Agreement) and JPMorgan Chase Bank, as trustee (in such capacity, the
"Trustee") and custodian (in such capacity, the "Custodian"), a summary of
certain of the pertinent provisions of which is set forth hereafter. The Trust
consists primarily of a pool of Mortgage Loans. This Certificate is issued under
and is subject to the terms, provisions and conditions of the Trust Agreement
and also is subject to certain terms and conditions set forth in the Sale
Agreements and the Servicing Agreements, to which the Sale Agreements and the
Servicing Agreements the Holder of this Certificate, by virtue of the acceptance
hereof assents and by which such Certificateholder is bound.

         Distributions on this Certificate (including the final distribution on
this Certificate) will be made out of the related Available Distribution Amount,
to the extent and subject to the limitations set forth in the Trust Agreement,
on the 25th day of each month, or if such day is not a Business Day, the next
succeeding Business Day, beginning in June 2004 (each, a "Distribution Date"),
commencing on the first Distribution Date specified above, to the Person in
whose name this Certificate is registered at the close of business on the last
Business Day of the Interest Accrual Period related to such Distribution Date
(the "Record Date"). Distributions on this Certificate will generally be made
from collections on Mortgage Loans. All sums distributable on this Certificate
are payable in the coin or currency of the United States of America as at the
time of payment is legal tender for the payment of public and private debts.

         Distributions on this Certificate will be paid in accordance with the
terms of the Trust Agreement, the Sale Agreements and the Servicing Agreements.
Distributions allocated to

111484 GSR 2004-7
Trust Agreement

                                     1A2-3
<PAGE>

this Certificate on any Distribution Date will be an amount equal to this
Certificate's Percentage Interest of the related Available Distribution Amount
to be distributed on this Class of Certificates as of such Distribution Date,
with a final distribution to be made upon retirement of this Certificate as set
forth in the Trust Agreement.

         This Certificate is one of a duly authorized issue of Certificates
designated as Mortgage Pass-Through Certificates, Series 2004-7 (herein called
the "Certificates"), and representing a Percentage Interest in the Class of
Certificates specified on the face hereof equal to the quotient, expressed as a
percentage, obtained by dividing the denomination of this Certificate specified
on the face hereof by the aggregate Certificate Principal Balance of all the
Class 1A2 Certificates. The Certificates are issued in multiple Classes
designated as specifically set forth in the Trust Agreement. The Certificates
will evidence in the aggregate 100% of the beneficial ownership of the Trust.

         Realized Losses and interest shortfalls on the Mortgage Loans shall be
allocated among the Classes of Certificates on the applicable Distribution Date
in the manner set forth in the Trust Agreement. To the extent provided in the
Trust Agreement, with respect to Realized Losses and interest shortfalls, the
Subordinate Certificates will be subordinated to the Senior Certificates and
each of the Subordinate Certificates will be subordinated to each of the other
Subordinate Certificates with a lower numerical class designation, if any. All
Realized Losses and interest shortfalls on the Mortgage Loans allocated to any
Class of Certificates will be allocated pro rata among the outstanding
Certificates of such Class, as described in the Trust Agreement.

         The Certificates are limited in right of payment to certain collections
and recoveries respecting the Mortgage Loans, all as more specifically set forth
in the Trust Agreement. As provided in the Trust Agreement, withdrawals from the
Collection Accounts, the Certificate Account and related accounts shall be made
from time to time for purposes other than distributions to Holders, such
purposes including reimbursement of Advances made, or certain expenses incurred,
with respect to the Mortgage Loans and administration of the Trust.

         All distributions or allocations made with respect to each Class on any
Distribution Date shall be allocated in accordance with the Trust Agreement.
Payment shall be made either (1) by check mailed to the address of each
Certificateholder as it appears in the Certificate Register on the Record Date
immediately prior to such Distribution Date or (2) with respect to the
Certificates other than the Residual Certificates, by wire transfer of
immediately available funds to the account of a Certificateholder at a bank or
other entity having appropriate facilities therefor, if such Certificateholder
shall have so notified the Trustee in writing by the Record Date immediately
prior to such Distribution Date and such Certificateholder is the registered
owner of an initial Certificate Principal Balance or Notional Amount of at least
$1,000,000. The Trustee may charge the Certificateholder a fee for any payment
made by wire transfer. Final distribution on the Certificates will be made only
upon surrender of the Certificates at the offices of the Certificate Registrar
set forth in the notice of such final distribution.

         The Trust Agreement permits, with certain exceptions therein provided,
the amendment thereof and the modification of the rights and obligations of the
Depositor, the

111484 GSR 2004-7
Trust Agreement

                                     1A2-4
<PAGE>

Trustee and the Custodian and the rights of the Certificateholders under the
Trust Agreement at any time by the Depositor, the Trustee and the Custodian with
the consent of the Certificateholders entitled to at least 51% of the Voting
Rights. Any such consent by the Holder of this Certificate shall be conclusive
and binding on such Certificateholder and upon all future Holders of this
Certificate and of any Certificate issued upon the transfer hereof or in
exchange herefor or in lieu hereof whether or not notation of such consent is
made upon this Certificate. The Trust Agreement also permits the amendment
thereof, in certain limited circumstances, without the consent of the
Certificateholders.

         The Certificates are issuable in fully registered form only, without
coupons, in denominations specified in the Trust Agreement. As provided in the
Trust Agreement and subject to any limitations on transfer of this Certificate
by a Depository or its nominee and certain limitations set forth in the Trust
Agreement, the transfer of this Certificate is registrable in the Certificate
Register upon surrender of this Certificate for registration of transfer at the
principal Corporate Trust Office of the Trustee or such other offices or
agencies appointed by the Trustee for that purpose and such other locations
provided in the Trust Agreement, duly endorsed by or accompanied by an
assignment in the form below or other written instrument of transfer in form
satisfactory to, the Trustee and the Certificate Registrar duly executed by the
Certificateholder hereof, or such Certificateholder's attorney duly authorized
in writing, and thereupon one or more new Certificates of the same Class in the
same aggregate Certificate Principal Balance will be issued to the designated
transferee or transferees.

         As provided in the Trust Agreement and subject to certain limitations
therein set forth, this Certificate is exchangeable for a new Certificate of the
same Class in the same denomination. No service charge will be made for any such
registration of transfer or exchange, but the Trustee may require payment of a
sum sufficient to cover any tax or other governmental charge that may be imposed
in connection with any transfer or exchange of Certificates.

         The Depositor, the Trustee, the Custodian and the Certificate Registrar
and any agent of the Depositor, the Trustee, the Custodian or the Certificate
Registrar may treat the Person in whose name this Certificate is registered as
the owner hereof for all purposes, and none of the Depositor, the Trustee, the
Custodian, the Certificate Registrar or any such agent shall be affected by
notice to the contrary.

         The obligations created by the Trust Agreement will terminate upon
payment to the Certificateholders of all amounts held in the Collection Accounts
and the Certificate Account required to be paid to the Certificateholders
pursuant to the Trust Agreement, following the earlier of: (i) the final payment
or other liquidation (or any advance with respect thereto) of the last Mortgage
Loan remaining in the Trust or the disposition of all property acquired upon
foreclosure of any such Mortgage Loan and (ii) the repurchase of all the assets
of the Trust by Countrywide Home Loans Servicing LP or the Depositor, in
accordance with the Trust Agreement when the aggregate Scheduled Principal
Balance of the Mortgage Loans equals 10% or less of the aggregate Scheduled
Principal Balance of the Mortgage Loans as of the Cut-Off Date. Written notice
of termination will be given to each Certificateholder, and the final
distribution will be made only upon surrender and cancellation of the
Certificates at an office or agency appointed by the Trustee which will be
specified in the notice of termination.

111484 GSR 2004-7
Trust Agreement

                                     1A2-5
<PAGE>

         Any such repurchase of Mortgage Loans and property acquired in respect
of the Mortgage Loans shall be made at the Termination Price.

         Unless the certificate of authentication hereon has been executed by
the Certificate Registrar, by manual signature, this Certificate shall not be
entitled to any benefit under the Trust Agreement or be valid for any purpose.

         THIS CERTIFICATE AND THE TRUST AGREEMENT SHALL BE CONSTRUED IN
ACCORDANCE WITH, AND GOVERNED BY, THE LAWS OF THE STATE OF NEW YORK.

         The Trustee has executed this Certificate on behalf of the Trust as
Trustee under the Trust Agreement, and the Trustee shall be liable hereunder
only in respect of the assets of the Trust.

         Capitalized terms used herein and not defined herein shall have the
meaning assigned to them in the Trust Agreement.

         In the event that the terms of this Certificate conflict with the terms
of the Trust Agreement, the terms of the Trust Agreement shall control.

111484 GSR 2004-7
Trust Agreement

                                     1A2-6
<PAGE>

            IN WITNESS WHEREOF, the Trustee has caused this Certificate to be
duly executed.

Dated: June 30, 2004              JPMORGAN CHASE BANK,
                                    not in its individual capacity but solely
                                    as Trustee

                                  By:___________________________________________
                                     AUTHORIZED OFFICER

                          CERTIFICATE OF AUTHENTICATION

THIS IS ONE OF THE CLASS 1A2 CERTIFICATES REFERRED TO IN THE WITHIN-MENTIONED
TRUST AGREEMENT.

                                  JPMORGAN CHASE BANK,
                                    as Certificate Registrar

                                  By:___________________________________________
                                     AUTHORIZED OFFICER

111484 GSR 2004-7
Trust Agreement

                                     1A2-7

<PAGE>

                                  ABBREVIATIONS

The following abbreviations, when used in the inscription on the face of this
Certificate, shall be construed as though they were written out in full
according to applicable laws or regulations:

TEN COM -- as tenants in common       UNIF GIFT MIN ACT -- ____Custodian________
TEN ENT -- as tenants by the                                 (Cust)      (Minor)
   entireties

JT TEN -- as joint tenants with       Under Uniform Gifts to Minors Act_________
rights of survivorship and not as                                        (State)
Tenants in Common

                    Additional abbreviations may also be used
                          though not in the above list.

111484 GSR 2004-7
Trust Agreement

                                     1A2-8

<PAGE>

                                FORM OF TRANSFER

FOR VALUE RECEIVED, the undersigned hereby sells, assigns and transfers unto

________________________________________________________________________________

PLEASE INSERT SOCIAL SECURITY OR
OTHER IDENTIFYING NUMBER OF
ASSIGNEE________________________________________________________________________

________________________________________________________________________________

            (Please print or typewrite name and address of assignee)

the within Certificate and does hereby irrevocably constitute and,

appoint __________________ (Attorney) to transfer the said Certificate in the

Certificate Register of the within-named Trust, with full power of substitution

in the premises.

Dated:   ______________________        _________________________________________

                                       NOTICE: The signature to this assignment
                                       must correspond with the name as written
                                       upon the face of this certificate in
                                       every particular without alteration or
                                       enlargement or any change whatever.

_______________________________

SIGNATURE GUARANTEED: The
signature must be guaranteed by a
commercial bank or trust company or by a
member firm of the New York Stock
Exchange or another national certificates
exchange. Notarized or witnessed
signatures are not acceptable.

111484 GSR 2004-7
Trust Agreement

                                     1A2-9

<PAGE>

                            DISTRIBUTION INSTRUCTIONS

The assignee should include the following for purposes of distribution:

Distribution shall be made, by wire transfer or otherwise, in immediately
available funds, to ___________________________, for the account of
_____________________, account number _________________, or if mailed by check
to ______________________________. Applicable reports and statements should be
mailed to __________________________. This information is provided by
____________________________, the assignee named above, or _______________, as
agent.

111484 GSR 2004-7
Trust Agreement

                                     1A2-10
<PAGE>

                                   EXHIBIT 1A3

                          FORM OF CLASS 1A3 CERTIFICATE

                     GS MORTGAGE SECURITIES CORP., DEPOSITOR
                MORTGAGE PASS-THROUGH CERTIFICATES, SERIES 2004-7
                              CLASS 1A3 CERTIFICATE

UNLESS THIS CERTIFICATE IS PRESENTED BY AN AUTHORIZED REPRESENTATIVE OF THE
DEPOSITORY TRUST COMPANY, A NEW YORK CORPORATION ("DTC"), TO THE TRUSTEE OR ITS
AGENT FOR REGISTRATION OF TRANSFER, EXCHANGE, OR PAYMENT, AND ANY CERTIFICATE
ISSUED IS REGISTERED IN THE NAME OF CEDE & CO. OR IN SUCH OTHER NAME AS IS
REQUESTED BY AN AUTHORIZED REPRESENTATIVE OF DTC (AND ANY PAYMENT MADE TO CEDE &
CO. OR TO SUCH OTHER ENTITY AS IS REQUESTED BY AN AUTHORIZED REPRESENTATIVE OF
DTC), ANY TRANSFER, PLEDGE, OR OTHER USE HEREOF FOR VALUE OR OTHERWISE BY OR TO
ANY PERSON IS WRONGFUL INASMUCH AS THE REGISTERED OWNER HEREOF, CEDE & CO., HAS
AN INTEREST HEREIN.

THIS CLASS 1A3 CERTIFICATE IS SUBORDINATED TO THE EXTENT DESCRIBED HEREIN AND IN
THE TRUST AGREEMENT REFERENCED HEREIN.

THIS CLASS 1A3 CERTIFICATE REPRESENTS A REMIC REGULAR INTEREST FOR FEDERAL
INCOME TAX PURPOSES.

THE PRINCIPAL OF THIS CLASS 1A3 CERTIFICATE IS SUBJECT TO PREPAYMENT FROM TIME
TO TIME WITHOUT SURRENDER OF OR NOTATION ON THIS CERTIFICATE. ACCORDINGLY, THE
CERTIFICATE PRINCIPAL BALANCE OF THIS CERTIFICATE MAY BE LESS THAN THAT SET
FORTH BELOW. ANYONE ACQUIRING THIS CERTIFICATE MAY ASCERTAIN ITS CURRENT
CERTIFICATE PRINCIPAL BALANCE BY INQUIRY OF THE TRUSTEE.

111484 GSR 2004-7
Trust Agreement

                                     1A3-1
<PAGE>

                     GS MORTGAGE SECURITIES CORP., DEPOSITOR
                MORTGAGE PASS-THROUGH CERTIFICATES, SERIES 2004-7
                              CLASS 1A3 CERTIFICATE

INITIAL CERTIFICATE RATE                  APPROXIMATE AGGREGATE INITIAL
PER ANNUM: 3.492%(3)                      CERTIFICATE PRINCIPAL BALANCE OF THE
                                          CLASS 1A3 CERTIFICATES AS OF THE
                                          CLOSING DATE: $105,000,000

PERCENTAGE INTEREST: 100%

MINIMUM DENOMINATION:                     $25,000 AND $1 IN EXCESS OF $25,000

DATE OF THE TRUST                         APPROXIMATE AGGREGATE SCHEDULED
AGREEMENT:                                PRINCIPAL BALANCE AS OF THE CUT-OFF
JUNE 1, 2004                              DATE OF THE MORTGAGE LOANS HELD BY THE
                                          TRUST: $699,836,637

CLOSING DATE:                             SERVICERS:
JUNE 30, 2004                             COUNTRYWIDE HOME LOANS SERVICING LP
                                          NATIONAL CITY MORTGAGE CO.

FIRST DISTRIBUTION DATE:
JULY 26, 2004

FINAL SCHEDULED                           TRUSTEE: JPMORGAN CHASE BANK
DISTRIBUTION DATE:                        CUSTODIAN: JPMORGAN CHASE BANK
JUNE 25, 2034

NO. 1                                     CUSIP NUMBER: 36228F 5R 3
                                          ISIN NUMBER: US36228F5R33

----------------------
(3)   For each Distribution Date, the Certificate Rate for the Class 1A3
Certificates will equal a variable rate determined in accordance with the Trust
Agreement.

111484 GSR 2004-7
Trust Agreement

                                     1A3-2
<PAGE>

                     GS MORTGAGE SECURITIES CORP., DEPOSITOR
                MORTGAGE PASS-THROUGH CERTIFICATES, SERIES 2004-7
                              CLASS 1A3 CERTIFICATE

      evidencing a beneficial ownership interest in a Trust consisting of the
      entire beneficial ownership of a pool of certain hybrid adjustable-rate
      single family, fully amortizing, first lien Mortgage Loans formed and sold
      by

                          GS MORTGAGE SECURITIES CORP.

THIS CERTIFICATE DOES NOT REPRESENT AN OBLIGATION OF, OR INTEREST IN, AND IS NOT
GUARANTEED BY, GS MORTGAGE SECURITIES CORP., THE SERVICERS, THE TRUSTEE, THE
CUSTODIAN OR ANY OF THEIR AFFILIATES. NEITHER THIS CERTIFICATE NOR THE
UNDERLYING MORTGAGE LOANS ARE GUARANTEED BY ANY AGENCY OR INSTRUMENTALITY OF THE
UNITED STATES.

THIS CERTIFIES THAT:

                                   CEDE & CO.

is the registered owner of the Percentage Interest evidenced by this Certificate
in the Class 1A3 Certificates (the "Class 1A3 Certificates") issued by the trust
(the "Trust") created pursuant to a Trust Agreement, dated as specified above
(the "Trust Agreement"), between GS Mortgage Certificates Corp., as depositor
(hereinafter the "Depositor," which term includes any successor entity under the
Trust Agreement) and JPMorgan Chase Bank, as trustee (in such capacity, the
"Trustee") and custodian (in such capacity, the "Custodian"), a summary of
certain of the pertinent provisions of which is set forth hereafter. The Trust
consists primarily of a pool of Mortgage Loans. This Certificate is issued under
and is subject to the terms, provisions and conditions of the Trust Agreement
and also is subject to certain terms and conditions set forth in the Sale
Agreements and the Servicing Agreements, to which the Sale Agreements and the
Servicing Agreements the Holder of this Certificate, by virtue of the acceptance
hereof assents and by which such Certificateholder is bound.

            Distributions on this Certificate (including the final distribution
on this Certificate) will be made out of the related Available Distribution
Amount, to the extent and subject to the limitations set forth in the Trust
Agreement, on the 25th day of each month, or if such day is not a Business Day,
the next succeeding Business Day, beginning in June 2004 (each, a "Distribution
Date"), commencing on the first Distribution Date specified above, to the Person
in whose name this Certificate is registered at the close of business on the
last Business Day of the Interest Accrual Period related to such Distribution
Date (the "Record Date"). Distributions on this Certificate will generally be
made from collections on Mortgage Loans. All sums distributable on this
Certificate are payable in the coin or currency of the United States of America
as at the time of payment is legal tender for the payment of public and private
debts.

            Distributions on this Certificate will be paid in accordance with
the terms of the Trust Agreement, the Sale Agreements and the Servicing
Agreements. Distributions allocated to

111484 GSR 2004-7
Trust Agreement

                                     1A3-3
<PAGE>

this Certificate on any Distribution Date will be an amount equal to this
Certificate's Percentage Interest of the related Available Distribution Amount
to be distributed on this Class of Certificates as of such Distribution Date,
with a final distribution to be made upon retirement of this Certificate as set
forth in the Trust Agreement.

            This Certificate is one of a duly authorized issue of Certificates
designated as Mortgage Pass-Through Certificates, Series 2004-7 (herein called
the "Certificates"), and representing a Percentage Interest in the Class of
Certificates specified on the face hereof equal to the quotient, expressed as a
percentage, obtained by dividing the denomination of this Certificate specified
on the face hereof by the aggregate Certificate Principal Balance of all the
Class 1A3 Certificates. The Certificates are issued in multiple Classes
designated as specifically set forth in the Trust Agreement. The Certificates
will evidence in the aggregate 100% of the beneficial ownership of the Trust.

            Realized Losses and interest shortfalls on the Mortgage Loans shall
be allocated among the Classes of Certificates on the applicable Distribution
Date in the manner set forth in the Trust Agreement. To the extent provided in
the Trust Agreement, with respect to Realized Losses and interest shortfalls,
the Subordinate Certificates will be subordinated to the Senior Certificates and
each of the Subordinate Certificates will be subordinated to each of the other
Subordinate Certificates with a lower numerical class designation, if any. All
Realized Losses and interest shortfalls on the Mortgage Loans allocated to any
Class of Certificates will be allocated pro rata among the outstanding
Certificates of such Class, as described in the Trust Agreement.

            The Certificates are limited in right of payment to certain
collections and recoveries respecting the Mortgage Loans, all as more
specifically set forth in the Trust Agreement. As provided in the Trust
Agreement, withdrawals from the Collection Accounts, the Certificate Account and
related accounts shall be made from time to time for purposes other than
distributions to Holders, such purposes including reimbursement of Advances
made, or certain expenses incurred, with respect to the Mortgage Loans and
administration of the Trust.

            All distributions or allocations made with respect to each Class on
any Distribution Date shall be allocated in accordance with the Trust Agreement.
Payment shall be made either (1) by check mailed to the address of each
Certificateholder as it appears in the Certificate Register on the Record Date
immediately prior to such Distribution Date or (2) with respect to the
Certificates other than the Residual Certificates, by wire transfer of
immediately available funds to the account of a Certificateholder at a bank or
other entity having appropriate facilities therefor, if such Certificateholder
shall have so notified the Trustee in writing by the Record Date immediately
prior to such Distribution Date and such Certificateholder is the registered
owner of an initial Certificate Principal Balance or Notional Amount of at least
$1,000,000. The Trustee may charge the Certificateholder a fee for any payment
made by wire transfer. Final distribution on the Certificates will be made only
upon surrender of the Certificates at the offices of the Certificate Registrar
set forth in the notice of such final distribution.

            The Trust Agreement permits, with certain exceptions therein
provided, the amendment thereof and the modification of the rights and
obligations of the Depositor, the

111484 GSR 2004-7
Trust Agreement

                                     1A3-4
<PAGE>

Trustee and the Custodian and the rights of the Certificateholders under the
Trust Agreement at any time by the Depositor, the Trustee and the Custodian with
the consent of the Certificateholders entitled to at least 51% of the Voting
Rights. Any such consent by the Holder of this Certificate shall be conclusive
and binding on such Certificateholder and upon all future Holders of this
Certificate and of any Certificate issued upon the transfer hereof or in
exchange herefor or in lieu hereof whether or not notation of such consent is
made upon this Certificate. The Trust Agreement also permits the amendment
thereof, in certain limited circumstances, without the consent of the
Certificateholders.

            The Certificates are issuable in fully registered form only, without
coupons, in denominations specified in the Trust Agreement. As provided in the
Trust Agreement and subject to any limitations on transfer of this Certificate
by a Depository or its nominee and certain limitations set forth in the Trust
Agreement, the transfer of this Certificate is registrable in the Certificate
Register upon surrender of this Certificate for registration of transfer at the
principal Corporate Trust Office of the Trustee or such other offices or
agencies appointed by the Trustee for that purpose and such other locations
provided in the Trust Agreement, duly endorsed by or accompanied by an
assignment in the form below or other written instrument of transfer in form
satisfactory to, the Trustee and the Certificate Registrar duly executed by the
Certificateholder hereof, or such Certificateholder's attorney duly authorized
in writing, and thereupon one or more new Certificates of the same Class in the
same aggregate Certificate Principal Balance will be issued to the designated
transferee or transferees.

            As provided in the Trust Agreement and subject to certain
limitations therein set forth, this Certificate is exchangeable for a new
Certificate of the same Class in the same denomination. No service charge will
be made for any such registration of transfer or exchange, but the Trustee may
require payment of a sum sufficient to cover any tax or other governmental
charge that may be imposed in connection with any transfer or exchange of
Certificates.

            The Depositor, the Trustee, the Custodian and the Certificate
Registrar and any agent of the Depositor, the Trustee, the Custodian or the
Certificate Registrar may treat the Person in whose name this Certificate is
registered as the owner hereof for all purposes, and none of the Depositor, the
Trustee, the Custodian, the Certificate Registrar or any such agent shall be
affected by notice to the contrary.

            The obligations created by the Trust Agreement will terminate upon
payment to the Certificateholders of all amounts held in the Collection Accounts
and the Certificate Account required to be paid to the Certificateholders
pursuant to the Trust Agreement, following the earlier of: (i) the final payment
or other liquidation (or any advance with respect thereto) of the last Mortgage
Loan remaining in the Trust or the disposition of all property acquired upon
foreclosure of any such Mortgage Loan and (ii) the repurchase of all the assets
of the Trust by Countrywide Home Loans Servicing LP or the Depositor, in
accordance with the Trust Agreement when the aggregate Scheduled Principal
Balance of the Mortgage Loans equals 10% or less of the aggregate Scheduled
Principal Balance of the Mortgage Loans as of the Cut-Off Date. Written notice
of termination will be given to each Certificateholder, and the final
distribution will be made only upon surrender and cancellation of the
Certificates at an office or agency appointed by the Trustee which will be
specified in the notice of termination.

111484 GSR 2004-7
Trust Agreement

                                     1A3-5
<PAGE>

            Any such repurchase of Mortgage Loans and property acquired in
respect of the Mortgage Loans shall be made at the Termination Price.

            Unless the certificate of authentication hereon has been executed by
the Certificate Registrar, by manual signature, this Certificate shall not be
entitled to any benefit under the Trust Agreement or be valid for any purpose.

            THIS CERTIFICATE AND THE TRUST AGREEMENT SHALL BE CONSTRUED IN
ACCORDANCE WITH, AND GOVERNED BY, THE LAWS OF THE STATE OF NEW YORK.

            The Trustee has executed this Certificate on behalf of the Trust as
Trustee under the Trust Agreement, and the Trustee shall be liable hereunder
only in respect of the assets of the Trust.

            Capitalized terms used herein and not defined herein shall have the
meaning assigned to them in the Trust Agreement.

            In the event that the terms of this Certificate conflict with the
terms of the Trust Agreement, the terms of the Trust Agreement shall control.

111484 GSR 2004-7
Trust Agreement

                                     1A3-6
<PAGE>

            IN WITNESS WHEREOF, the Trustee has caused this Certificate to be
duly executed.

Dated: June 30, 2004                      JPMORGAN CHASE BANK,
                                            not in its individual capacity but
                                            solely as Trustee

                                          By:___________________________________
                                             AUTHORIZED OFFICER

                          CERTIFICATE OF AUTHENTICATION

THIS IS ONE OF THE CLASS 1A3 CERTIFICATES REFERRED TO IN THE WITHIN-MENTIONED
TRUST AGREEMENT.

                                              JPMORGAN CHASE BANK,
                                                as Certificate Registrar

                                              By:_______________________________
                                                 AUTHORIZED OFFICER

111484 GSR 2004-7
Trust Agreement

                                     1A3-7
<PAGE>

                                  ABBREVIATIONS

The following abbreviations, when used in the inscription on the face of this
Certificate, shall be construed as though they were written out in full
according to applicable laws or regulations:

TEN COM -- as tenants in common       UNIF GIFT MIN ACT -- ____Custodian________
TEN ENT -- as tenants by the                                 (Cust)      (Minor)
   entireties

JT TEN -- as joint tenants with    Under Uniform Gifts to Minors Act____________
rights of survivorship and not                                          (State)
as Tenants in Common

                    Additional abbreviations may also be used
                          though not in the above list.

111484 GSR 2004-7
Trust Agreement

                                     1A3-8
<PAGE>

                                FORM OF TRANSFER

FOR VALUE RECEIVED, the undersigned hereby sells, assigns and transfers unto

________________________________________________________________________________

PLEASE INSERT SOCIAL SECURITY OR
OTHER IDENTIFYING NUMBER OF
ASSIGNEE _______________________________________________________________________

________________________________________________________________________________
            (Please print or typewrite name and address of assignee)

the within Certificate and does hereby irrevocably constitute and, appoint
__________________ (Attorney) to transfer the said Certificate in the
Certificate Register of the within-named Trust, with full power of substitution
in the premises.

Dated: ______________________             ______________________________________

                                          NOTICE: The signature to this
                                          assignment must correspond with the
                                          name as written upon the face of this
                                          certificate in every particular
                                          without alteration or enlargement or
                                          any change whatever.

___________________________________

SIGNATURE GUARANTEED: The signature
must be guaranteed by a commercial
bank or trust company or by a member
firm of the New York Stock Exchange or
another national certificates
exchange. Notarized or witnessed
signatures are not acceptable.

111484 GSR 2004-7
Trust Agreement

                                     1A3-9
<PAGE>

                            DISTRIBUTION INSTRUCTIONS

The assignee should include the following for purposes of distribution:

Distribution shall be made, by wire transfer or otherwise, in immediately
available funds, to ___________________________, for the account of
_____________________, account number _________________, or if mailed by check
to ______________________________. Applicable reports and statements should be
mailed to __________________________. This information is provided by
____________________________, the assignee named above, or _______________, as
agent.

111484 GSR 2004-7
Trust Agreement

                                     1A3-10
<PAGE>

                                   EXHIBIT 2A1

                          FORM OF CLASS 2A1 CERTIFICATE

                     GS MORTGAGE SECURITIES CORP., DEPOSITOR
                MORTGAGE PASS-THROUGH CERTIFICATES, SERIES 2004-7
                              CLASS 2A1 CERTIFICATE

UNLESS THIS CERTIFICATE IS PRESENTED BY AN AUTHORIZED REPRESENTATIVE OF THE
DEPOSITORY TRUST COMPANY, A NEW YORK CORPORATION ("DTC"), TO THE TRUSTEE OR ITS
AGENT FOR REGISTRATION OF TRANSFER, EXCHANGE, OR PAYMENT, AND ANY CERTIFICATE
ISSUED IS REGISTERED IN THE NAME OF CEDE & CO. OR IN SUCH OTHER NAME AS IS
REQUESTED BY AN AUTHORIZED REPRESENTATIVE OF DTC (AND ANY PAYMENT MADE TO CEDE &
CO. OR TO SUCH OTHER ENTITY AS IS REQUESTED BY AN AUTHORIZED REPRESENTATIVE OF
DTC), ANY TRANSFER, PLEDGE, OR OTHER USE HEREOF FOR VALUE OR OTHERWISE BY OR TO
ANY PERSON IS WRONGFUL INASMUCH AS THE REGISTERED OWNER HEREOF, CEDE & CO., HAS
AN INTEREST HEREIN.

THIS CLASS 2A1 CERTIFICATE IS SUBORDINATED TO THE EXTENT DESCRIBED HEREIN AND IN
THE TRUST AGREEMENT REFERENCED HEREIN.

THIS CLASS 2A1 CERTIFICATE REPRESENTS A REMIC REGULAR INTEREST FOR FEDERAL
INCOME TAX PURPOSES.

THE PRINCIPAL OF THIS CLASS 2A1 CERTIFICATE IS SUBJECT TO PREPAYMENT FROM TIME
TO TIME WITHOUT SURRENDER OF OR NOTATION ON THIS CERTIFICATE. ACCORDINGLY, THE
CERTIFICATE PRINCIPAL BALANCE OF THIS CERTIFICATE MAY BE LESS THAN THAT SET
FORTH BELOW. ANYONE ACQUIRING THIS CERTIFICATE MAY ASCERTAIN ITS CURRENT
CERTIFICATE PRINCIPAL BALANCE BY INQUIRY OF THE TRUSTEE.

111484 GSR 2004-7
Trust Agreement

                                     2A1-1
<PAGE>

                     GS MORTGAGE SECURITIES CORP., DEPOSITOR
                MORTGAGE PASS-THROUGH CERTIFICATES, SERIES 2004-7
                              CLASS 2A1 CERTIFICATE

INITIAL CERTIFICATE RATE                   APPROXIMATE AGGREGATE INITIAL
PER ANNUM: 4.191%(4)                       CERTIFICATE PRINCIPAL BALANCE OF
                                           THE CLASS 2A1 CERTIFICATES AS OF
                                           THE CLOSING DATE: $99,089,000

PERCENTAGE INTEREST: 100%

MINIMUM DENOMINATION:                      $25,000 AND $1 IN EXCESS OF $25,000

DATE OF THE TRUST                          APPROXIMATE AGGREGATE
AGREEMENT:                                 SCHEDULED PRINCIPAL BALANCE AS
JUNE 1, 2004                               OF THE CUT-OFF DATE OF THE
                                           MORTGAGE LOANS HELD BY THE
                                           TRUST: $699,836,637

CLOSING DATE:                              SERVICERS:
JUNE 30, 2004                              COUNTRYWIDE HOME LOANS SERVICING LP
                                           NATIONAL CITY MORTGAGE CO.

FIRST DISTRIBUTION DATE:
JULY 26, 2004

FINAL SCHEDULED                            TRUSTEE: JPMORGAN CHASE BANK
DISTRIBUTION DATE:                         CUSTODIAN: JPMORGAN CHASE BANK
JUNE 25, 2034

NO. 1                                      CUSIP NUMBER: 36228F 4Q 6
                                           ISIN NUMBER: US36228F4Q68

------------------
(4)   For each Distribution Date, the Certificate Rate for the Class 2A1
Certificates will equal a variable rate determined in accordance with the Trust
Agreement.

111484 GSR 2004-7
Trust Agreement

                                     2A1-2
<PAGE>

                     GS MORTGAGE SECURITIES CORP., DEPOSITOR
                MORTGAGE PASS-THROUGH CERTIFICATES, SERIES 2004-7
                              CLASS 2A1 CERTIFICATE

      evidencing a beneficial ownership interest in a Trust consisting of the
      entire beneficial ownership of a pool of certain hybrid adjustable-rate
      single family, fully amortizing, first lien Mortgage Loans formed and sold
      by

                          GS MORTGAGE SECURITIES CORP.

THIS CERTIFICATE DOES NOT REPRESENT AN OBLIGATION OF, OR INTEREST IN, AND IS NOT
GUARANTEED BY, GS MORTGAGE SECURITIES CORP., THE SERVICERS, THE TRUSTEE, THE
CUSTODIAN OR ANY OF THEIR AFFILIATES. NEITHER THIS CERTIFICATE NOR THE
UNDERLYING MORTGAGE LOANS ARE GUARANTEED BY ANY AGENCY OR INSTRUMENTALITY OF THE
UNITED STATES.

THIS CERTIFIES THAT:

                                   CEDE & CO.

is the registered owner of the Percentage Interest evidenced by this Certificate
in the Class 2A1 Certificates (the "Class 2A1 Certificates") issued by the trust
(the "Trust") created pursuant to a Trust Agreement, dated as specified above
(the "Trust Agreement"), between GS Mortgage Certificates Corp., as depositor
(hereinafter the "Depositor," which term includes any successor entity under the
Trust Agreement) and JPMorgan Chase Bank, as trustee (in such capacity, the
"Trustee") and custodian (in such capacity, the "Custodian"), a summary of
certain of the pertinent provisions of which is set forth hereafter. The Trust
consists primarily of a pool of Mortgage Loans. This Certificate is issued under
and is subject to the terms, provisions and conditions of the Trust Agreement
and also is subject to certain terms and conditions set forth in the Sale
Agreements and the Servicing Agreements, to which the Sale Agreements and the
Servicing Agreements the Holder of this Certificate, by virtue of the acceptance
hereof assents and by which such Certificateholder is bound.

            Distributions on this Certificate (including the final distribution
on this Certificate) will be made out of the related Available Distribution
Amount, to the extent and subject to the limitations set forth in the Trust
Agreement, on the 25th day of each month, or if such day is not a Business Day,
the next succeeding Business Day, beginning in June 2004 (each, a "Distribution
Date"), commencing on the first Distribution Date specified above, to the Person
in whose name this Certificate is registered at the close of business on the
last Business Day of the Interest Accrual Period related to such Distribution
Date (the "Record Date"). Distributions on this Certificate will generally be
made from collections on Mortgage Loans. All sums distributable on this
Certificate are payable in the coin or currency of the United States of America
as at the time of payment is legal tender for the payment of public and private
debts.

            Distributions on this Certificate will be paid in accordance with
the terms of the Trust Agreement, the Sale Agreements and the Servicing
Agreements. Distributions allocated to

111484 GSR 2004-7
Trust Agreement

                                     2A1-3
<PAGE>

this Certificate on any Distribution Date will be an amount equal to this
Certificate's Percentage Interest of the related Available Distribution Amount
to be distributed on this Class of Certificates as of such Distribution Date,
with a final distribution to be made upon retirement of this Certificate as set
forth in the Trust Agreement.

            This Certificate is one of a duly authorized issue of Certificates
designated as Mortgage Pass-Through Certificates, Series 2004-7 (herein called
the "Certificates"), and representing a Percentage Interest in the Class of
Certificates specified on the face hereof equal to the quotient, expressed as a
percentage, obtained by dividing the denomination of this Certificate specified
on the face hereof by the aggregate Certificate Principal Balance of all the
Class 2A1 Certificates. The Certificates are issued in multiple Classes
designated as specifically set forth in the Trust Agreement. The Certificates
will evidence in the aggregate 100% of the beneficial ownership of the Trust.

            Realized Losses and interest shortfalls on the Mortgage Loans shall
be allocated among the Classes of Certificates on the applicable Distribution
Date in the manner set forth in the Trust Agreement. To the extent provided in
the Trust Agreement, with respect to Realized Losses and interest shortfalls,
the Subordinate Certificates will be subordinated to the Senior Certificates and
each of the Subordinate Certificates will be subordinated to each of the other
Subordinate Certificates with a lower numerical class designation, if any. All
Realized Losses and interest shortfalls on the Mortgage Loans allocated to any
Class of Certificates will be allocated pro rata among the outstanding
Certificates of such Class, as described in the Trust Agreement.

            The Certificates are limited in right of payment to certain
collections and recoveries respecting the Mortgage Loans, all as more
specifically set forth in the Trust Agreement. As provided in the Trust
Agreement, withdrawals from the Collection Accounts, the Certificate Account and
related accounts shall be made from time to time for purposes other than
distributions to Holders, such purposes including reimbursement of Advances
made, or certain expenses incurred, with respect to the Mortgage Loans and
administration of the Trust.

            All distributions or allocations made with respect to each Class on
any Distribution Date shall be allocated in accordance with the Trust Agreement.
Payment shall be made either (1) by check mailed to the address of each
Certificateholder as it appears in the Certificate Register on the Record Date
immediately prior to such Distribution Date or (2) with respect to the
Certificates other than the Residual Certificates, by wire transfer of
immediately available funds to the account of a Certificateholder at a bank or
other entity having appropriate facilities therefor, if such Certificateholder
shall have so notified the Trustee in writing by the Record Date immediately
prior to such Distribution Date and such Certificateholder is the registered
owner of an initial Certificate Principal Balance or Notional Amount of at least
$1,000,000. The Trustee may charge the Certificateholder a fee for any payment
made by wire transfer. Final distribution on the Certificates will be made only
upon surrender of the Certificates at the offices of the Certificate Registrar
set forth in the notice of such final distribution.

            The Trust Agreement permits, with certain exceptions therein
provided, the amendment thereof and the modification of the rights and
obligations of the Depositor, the

111484 GSR 2004-7
Trust Agreement

                                     2A1-4
<PAGE>

Trustee and the Custodian and the rights of the Certificateholders under the
Trust Agreement at any time by the Depositor, the Trustee and the Custodian with
the consent of the Certificateholders entitled to at least 51% of the Voting
Rights. Any such consent by the Holder of this Certificate shall be conclusive
and binding on such Certificateholder and upon all future Holders of this
Certificate and of any Certificate issued upon the transfer hereof or in
exchange herefor or in lieu hereof whether or not notation of such consent is
made upon this Certificate. The Trust Agreement also permits the amendment
thereof, in certain limited circumstances, without the consent of the
Certificateholders.

            The Certificates are issuable in fully registered form only, without
coupons, in denominations specified in the Trust Agreement. As provided in the
Trust Agreement and subject to any limitations on transfer of this Certificate
by a Depository or its nominee and certain limitations set forth in the Trust
Agreement, the transfer of this Certificate is registrable in the Certificate
Register upon surrender of this Certificate for registration of transfer at the
principal Corporate Trust Office of the Trustee or such other offices or
agencies appointed by the Trustee for that purpose and such other locations
provided in the Trust Agreement, duly endorsed by or accompanied by an
assignment in the form below or other written instrument of transfer in form
satisfactory to, the Trustee and the Certificate Registrar duly executed by the
Certificateholder hereof, or such Certificateholder's attorney duly authorized
in writing, and thereupon one or more new Certificates of the same Class in the
same aggregate Certificate Principal Balance will be issued to the designated
transferee or transferees.

            As provided in the Trust Agreement and subject to certain
limitations therein set forth, this Certificate is exchangeable for a new
Certificate of the same Class in the same denomination. No service charge will
be made for any such registration of transfer or exchange, but the Trustee may
require payment of a sum sufficient to cover any tax or other governmental
charge that may be imposed in connection with any transfer or exchange of
Certificates.

            The Depositor, the Trustee, the Custodian and the Certificate
Registrar and any agent of the Depositor, the Trustee, the Custodian or the
Certificate Registrar may treat the Person in whose name this Certificate is
registered as the owner hereof for all purposes, and none of the Depositor, the
Trustee, the Custodian, the Certificate Registrar or any such agent shall be
affected by notice to the contrary.

            The obligations created by the Trust Agreement will terminate upon
payment to the Certificateholders of all amounts held in the Collection Accounts
and the Certificate Account required to be paid to the Certificateholders
pursuant to the Trust Agreement, following the earlier of: (i) the final payment
or other liquidation (or any advance with respect thereto) of the last Mortgage
Loan remaining in the Trust or the disposition of all property acquired upon
foreclosure of any such Mortgage Loan and (ii) the repurchase of all the assets
of the Trust by Countrywide Home Loans Servicing LP or the Depositor, in
accordance with the Trust Agreement when the aggregate Scheduled Principal
Balance of the Mortgage Loans equals 10% or less of the aggregate Scheduled
Principal Balance of the Mortgage Loans as of the Cut-Off Date. Written notice
of termination will be given to each Certificateholder, and the final
distribution will be made only upon surrender and cancellation of the
Certificates at an office or agency appointed by the Trustee which will be
specified in the notice of termination.

111484 GSR 2004-7
Trust Agreement

                                     2A1-5
<PAGE>

            Any such repurchase of Mortgage Loans and property acquired in
respect of the Mortgage Loans shall be made at the Termination Price.

            Unless the certificate of authentication hereon has been executed by
the Certificate Registrar, by manual signature, this Certificate shall not be
entitled to any benefit under the Trust Agreement or be valid for any purpose.

            THIS CERTIFICATE AND THE TRUST AGREEMENT SHALL BE CONSTRUED IN
ACCORDANCE WITH, AND GOVERNED BY, THE LAWS OF THE STATE OF NEW YORK.

            The Trustee has executed this Certificate on behalf of the Trust as
Trustee under the Trust Agreement, and the Trustee shall be liable hereunder
only in respect of the assets of the Trust.

            Capitalized terms used herein and not defined herein shall have the
meaning assigned to them in the Trust Agreement.

            In the event that the terms of this Certificate conflict with the
terms of the Trust Agreement, the terms of the Trust Agreement shall control.

111484 GSR 2004-7
Trust Agreement

                                     2A1-6
<PAGE>

            IN WITNESS WHEREOF, the Trustee has caused this Certificate to be
duly executed.

Dated: June 30, 2004                    JPMORGAN CHASE BANK,
                                          not in its individual capacity but
                                          solely as Trustee

                                        By:_____________________________________
                                           AUTHORIZED OFFICER

                          CERTIFICATE OF AUTHENTICATION

THIS IS ONE OF THE CLASS 2A1 CERTIFICATES REFERRED TO IN THE WITHIN-MENTIONED
TRUST AGREEMENT.

                                           JPMORGAN CHASE BANK,
                                             as Certificate Registrar

                                           By:__________________________________
                                              AUTHORIZED OFFICER

111484 GSR 2004-7
Trust Agreement

                                     2A1-7
<PAGE>

                                  ABBREVIATIONS

The following abbreviations, when used in the inscription on the face of this
Certificate, shall be construed as though they were written out in full
according to applicable laws or regulations:

<TABLE>
<S>                                               <C>
TEN COM--as tenants in common                     UNIF GIFT MIN ACT--____Custodian_______________
TEN ENT--as tenants by the                                             (Cust)         (Minor)
   entireties

JT TEN--as joint tenants with rights of           Under Uniform Gifts to Minors Act______________
survivorship and not as Tenants in Common                                             (State)
</TABLE>

                    Additional abbreviations may also be used
                          though not in the above list.

111484 GSR 2004-7
Trust Agreement

                                     2A1-8
<PAGE>

                                FORM OF TRANSFER

FOR VALUE RECEIVED, the undersigned hereby sells, assigns and transfers unto
________________________________________________________________________________

PLEASE INSERT SOCIAL SECURITY OR
OTHER IDENTIFYING NUMBER OF
ASSIGNEE _______________________________________________________________________

________________________________________________________________________________

            (Please print or typewrite name and address of assignee)

the within Certificate and does hereby irrevocably constitute and, appoint
__________________ (Attorney) to transfer the said Certificate in the
Certificate Register of the within-named Trust, with full power of substitution
in the premises.

Dated: ___________________________    __________________________________________

                                      NOTICE: The signature to this assignment
                                      must correspond with the name as written
                                      upon the face of this certificate in every
                                      particular without alteration or
                                      enlargement or any change whatever.

__________________________________

SIGNATURE GUARANTEED: The
signature must be guaranteed by a
commercial bank or trust company
or by a member firm of the New
York Stock Exchange or another
national certificates exchange.
Notarized or witnessed signatures
are not acceptable.

111484 GSR 2004-7
Trust Agreement

                                     2A1-9
<PAGE>

                            DISTRIBUTION INSTRUCTIONS

The assignee should include the following for purposes of distribution:

Distribution shall be made, by wire transfer or otherwise, in immediately
available funds, to ___________________________, for the account of
_____________________, account number _________________, or if mailed by check
to ______________________________. Applicable reports and statements should be
mailed to __________________________. This information is provided by
____________________________, the assignee named above, or _______________, as
agent.

111484 GSR 2004-7
Trust Agreement

                                     2A1-10
<PAGE>

                                   EXHIBIT 3A1

                          FORM OF CLASS 3A1 CERTIFICATE

                     GS MORTGAGE SECURITIES CORP., DEPOSITOR
                MORTGAGE PASS-THROUGH CERTIFICATES, SERIES 2004-7
                              CLASS 3A1 CERTIFICATE

UNLESS THIS CERTIFICATE IS PRESENTED BY AN AUTHORIZED REPRESENTATIVE OF THE
DEPOSITORY TRUST COMPANY, A NEW YORK CORPORATION ("DTC"), TO THE TRUSTEE OR ITS
AGENT FOR REGISTRATION OF TRANSFER, EXCHANGE, OR PAYMENT, AND ANY CERTIFICATE
ISSUED IS REGISTERED IN THE NAME OF CEDE & CO. OR IN SUCH OTHER NAME AS IS
REQUESTED BY AN AUTHORIZED REPRESENTATIVE OF DTC (AND ANY PAYMENT MADE TO CEDE &
CO. OR TO SUCH OTHER ENTITY AS IS REQUESTED BY AN AUTHORIZED REPRESENTATIVE OF
DTC), ANY TRANSFER, PLEDGE, OR OTHER USE HEREOF FOR VALUE OR OTHERWISE BY OR TO
ANY PERSON IS WRONGFUL INASMUCH AS THE REGISTERED OWNER HEREOF, CEDE & CO., HAS
AN INTEREST HEREIN.

THIS CLASS 3A1 CERTIFICATE IS SUBORDINATED TO THE EXTENT DESCRIBED HEREIN AND IN
THE TRUST AGREEMENT REFERENCED HEREIN.

THIS CLASS 3A1 CERTIFICATE REPRESENTS A REMIC REGULAR INTEREST FOR FEDERAL
INCOME TAX PURPOSES.

THE PRINCIPAL OF THIS CLASS 3A1 CERTIFICATE IS SUBJECT TO PREPAYMENT FROM TIME
TO TIME WITHOUT SURRENDER OF OR NOTATION ON THIS CERTIFICATE. ACCORDINGLY, THE
CERTIFICATE PRINCIPAL BALANCE OF THIS CERTIFICATE MAY BE LESS THAN THAT SET
FORTH BELOW. ANYONE ACQUIRING THIS CERTIFICATE MAY ASCERTAIN ITS CURRENT
CERTIFICATE PRINCIPAL BALANCE BY INQUIRY OF THE TRUSTEE.

111484 GSR 2004-7
Trust Agreement

                                     3A1-1
<PAGE>

                     GS MORTGAGE SECURITIES CORP., DEPOSITOR
                MORTGAGE PASS-THROUGH CERTIFICATES, SERIES 2004-7
                              CLASS 3A1 CERTIFICATE

INITIAL CERTIFICATE RATE                     APPROXIMATE AGGREGATE INITIAL
PER ANNUM: 3.939%(5)                         CERTIFICATE PRINCIPAL BALANCE OF
                                             THE CLASS 3A1 CERTIFICATES AS OF
                                             THE CLOSING DATE:  $237,742,000

PERCENTAGE INTEREST:  100%

MINIMUM DENOMINATION:                        $25,000 AND $1 IN EXCESS OF $25,000

DATE OF THE TRUST                            APPROXIMATE AGGREGATE
AGREEMENT:                                   SCHEDULED PRINCIPAL BALANCE AS
JUNE 1, 2004                                 OF THE CUT-OFF DATE OF THE
                                             MORTGAGE LOANS HELD BY THE
                                             TRUST: $699,836,637

CLOSING DATE:                                SERVICERS:
JUNE 30, 2004                                COUNTRYWIDE HOME LOANS SERVICING LP
                                             NATIONAL CITY MORTGAGE CO.

FIRST DISTRIBUTION DATE:
JULY 26, 2004

FINAL SCHEDULED                              TRUSTEE:  JPMORGAN CHASE BANK
DISTRIBUTION DATE:                           CUSTODIAN:  JPMORGAN CHASE BANK
JUNE 25, 2034

NO. 1                                        CUSIP NUMBER:  36228F 4R 4
                                             ISIN NUMBER:  US36228F4R42
------------

(5)   For each Distribution Date, the Certificate Rate for the Class 3A1
Certificates will equal a variable rate determined in accordance with the Trust
Agreement.

111484 GSR 2004-7
Trust Agreement

                                     3A1-2
<PAGE>

                     GS MORTGAGE SECURITIES CORP., DEPOSITOR
                MORTGAGE PASS-THROUGH CERTIFICATES, SERIES 2004-7
                              CLASS 3A1 CERTIFICATE

      evidencing a beneficial ownership interest in a Trust consisting of the
      entire beneficial ownership of a pool of certain hybrid adjustable-rate
      single family, fully amortizing, first lien Mortgage Loans formed and sold
      by

                          GS MORTGAGE SECURITIES CORP.

THIS CERTIFICATE DOES NOT REPRESENT AN OBLIGATION OF, OR INTEREST IN, AND IS NOT
GUARANTEED BY, GS MORTGAGE SECURITIES CORP., THE SERVICERS, THE TRUSTEE, THE
CUSTODIAN OR ANY OF THEIR AFFILIATES. NEITHER THIS CERTIFICATE NOR THE
UNDERLYING MORTGAGE LOANS ARE GUARANTEED BY ANY AGENCY OR INSTRUMENTALITY OF THE
UNITED STATES.

THIS CERTIFIES THAT:

                                   CEDE & CO.

is the registered owner of the Percentage Interest evidenced by this Certificate
in the Class 3A1 Certificates (the "Class 3A1 Certificates") issued by the trust
(the "Trust") created pursuant to a Trust Agreement, dated as specified above
(the "Trust Agreement"), between GS Mortgage Certificates Corp., as depositor
(hereinafter the "Depositor," which term includes any successor entity under the
Trust Agreement) and JPMorgan Chase Bank, as trustee (in such capacity, the
"Trustee") and custodian (in such capacity, the "Custodian"), a summary of
certain of the pertinent provisions of which is set forth hereafter. The Trust
consists primarily of a pool of Mortgage Loans. This Certificate is issued under
and is subject to the terms, provisions and conditions of the Trust Agreement
and also is subject to certain terms and conditions set forth in the Sale
Agreements and the Servicing Agreements, to which the Sale Agreements and the
Servicing Agreements the Holder of this Certificate, by virtue of the acceptance
hereof assents and by which such Certificateholder is bound.

            Distributions on this Certificate (including the final distribution
on this Certificate) will be made out of the related Available Distribution
Amount, to the extent and subject to the limitations set forth in the Trust
Agreement, on the 25th day of each month, or if such day is not a Business Day,
the next succeeding Business Day, beginning in June 2004 (each, a "Distribution
Date"), commencing on the first Distribution Date specified above, to the Person
in whose name this Certificate is registered at the close of business on the
last Business Day of the Interest Accrual Period related to such Distribution
Date (the "Record Date"). Distributions on this Certificate will generally be
made from collections on the Mortgage Loans. All sums distributable on this
Certificate are payable in the coin or currency of the United States of America
as at the time of payment is legal tender for the payment of public and private
debts.

            Distributions on this Certificate will be paid in accordance with
the terms of the Trust Agreement, the Sale Agreements and the Servicing
Agreements. Distributions allocated to

111484 GSR 2004-7
Trust Agreement

                                     3A1-3
<PAGE>

this Certificate on any Distribution Date will be an amount equal to this
Certificate's Percentage Interest of the related Available Distribution Amount
to be distributed on this Class of Certificates as of such Distribution Date,
with a final distribution to be made upon retirement of this Certificate as set
forth in the Trust Agreement.

            This Certificate is one of a duly authorized issue of Certificates
designated as Mortgage Pass-Through Certificates, Series 2004-7 (herein called
the "Certificates"), and representing a Percentage Interest in the Class of
Certificates specified on the face hereof equal to the quotient, expressed as a
percentage, obtained by dividing the denomination of this Certificate specified
on the face hereof by the aggregate Certificate Principal Balance of all the
Class 3A1 Certificates. The Certificates are issued in multiple Classes
designated as specifically set forth in the Trust Agreement. The Certificates
will evidence in the aggregate 100% of the beneficial ownership of the Trust.

            Realized Losses and interest shortfalls on the Mortgage Loans shall
be allocated among the Classes of Certificates on the applicable Distribution
Date in the manner set forth in the Trust Agreement. To the extent provided in
the Trust Agreement, with respect to Realized Losses and interest shortfalls,
the Subordinate Certificates will be subordinated to the Senior Certificates and
each of the Subordinate Certificates will be subordinated to each of the other
Subordinate Certificates with a lower numerical class designation, if any. All
Realized Losses and interest shortfalls on the Mortgage Loans allocated to any
Class of Certificates will be allocated pro rata among the outstanding
Certificates of such Class, as described in the Trust Agreement.

            The Certificates are limited in right of payment to certain
collections and recoveries respecting the Mortgage Loans, all as more
specifically set forth in the Trust Agreement. As provided in the Trust
Agreement, withdrawals from the Collection Accounts, the Certificate Account and
related accounts shall be made from time to time for purposes other than
distributions to Holders, such purposes including reimbursement of Advances
made, or certain expenses incurred, with respect to the Mortgage Loans and
administration of the Trust.

            All distributions or allocations made with respect to each Class on
any Distribution Date shall be allocated in accordance with the Trust Agreement.
Payment shall be made either (1) by check mailed to the address of each
Certificateholder as it appears in the Certificate Register on the Record Date
immediately prior to such Distribution Date or (2) with respect to the
Certificates other than the Residual Certificates, by wire transfer of
immediately available funds to the account of a Certificateholder at a bank or
other entity having appropriate facilities therefor, if such Certificateholder
shall have so notified the Trustee in writing by the Record Date immediately
prior to such Distribution Date and such Certificateholder is the registered
owner of an initial Certificate Principal Balance or Notional Amount of at least
$1,000,000. The Trustee may charge the Certificateholder a fee for any payment
made by wire transfer. Final distribution on the Certificates will be made only
upon surrender of the Certificates at the offices of the Certificate Registrar
set forth in the notice of such final distribution.

            The Trust Agreement permits, with certain exceptions therein
provided, the amendment thereof and the modification of the rights and
obligations of the Depositor, the

111484 GSR 2004-7
Trust Agreement

                                     3A1-4
<PAGE>

Trustee and the Custodian and the rights of the Certificateholders under the
Trust Agreement at any time by the Depositor, the Trustee and the Custodian with
the consent of the Certificateholders entitled to at least 51% of the Voting
Rights. Any such consent by the Holder of this Certificate shall be conclusive
and binding on such Certificateholder and upon all future Holders of this
Certificate and of any Certificate issued upon the transfer hereof or in
exchange herefor or in lieu hereof whether or not notation of such consent is
made upon this Certificate. The Trust Agreement also permits the amendment
thereof, in certain limited circumstances, without the consent of the
Certificateholders.

            The Certificates are issuable in fully registered form only, without
coupons, in denominations specified in the Trust Agreement. As provided in the
Trust Agreement and subject to any limitations on transfer of this Certificate
by a Depository or its nominee and certain limitations set forth in the Trust
Agreement, the transfer of this Certificate is registrable in the Certificate
Register upon surrender of this Certificate for registration of transfer at the
principal Corporate Trust Office of the Trustee or such other offices or
agencies appointed by the Trustee for that purpose and such other locations
provided in the Trust Agreement, duly endorsed by or accompanied by an
assignment in the form below or other written instrument of transfer in form
satisfactory to, the Trustee and the Certificate Registrar duly executed by the
Certificateholder hereof, or such Certificateholder's attorney duly authorized
in writing, and thereupon one or more new Certificates of the same Class in the
same aggregate Certificate Principal Balance will be issued to the designated
transferee or transferees.

            As provided in the Trust Agreement and subject to certain
limitations therein set forth, this Certificate is exchangeable for a new
Certificate of the same Class in the same denomination. No service charge will
be made for any such registration of transfer or exchange, but the Trustee may
require payment of a sum sufficient to cover any tax or other governmental
charge that may be imposed in connection with any transfer or exchange of
Certificates.

            The Depositor, the Trustee, the Custodian and the Certificate
Registrar and any agent of the Depositor, the Trustee, the Custodian or the
Certificate Registrar may treat the Person in whose name this Certificate is
registered as the owner hereof for all purposes, and none of the Depositor, the
Trustee, the Custodian, the Certificate Registrar or any such agent shall be
affected by notice to the contrary.

            The obligations created by the Trust Agreement will terminate upon
payment to the Certificateholders of all amounts held in the Collection Accounts
and the Certificate Account required to be paid to the Certificateholders
pursuant to the Trust Agreement, following the earlier of: (i) the final payment
or other liquidation (or any advance with respect thereto) of the last Mortgage
Loan remaining in the Trust or the disposition of all property acquired upon
foreclosure of any such Mortgage Loan and (ii) the repurchase of all the assets
of the Trust by Countrywide Home Loans Servicing LP or the Depositor, in
accordance with the Trust Agreement when the aggregate Scheduled Principal
Balance of the Mortgage Loans equals 10% or less of the aggregate Scheduled
Principal Balance of the Mortgage Loans as of the Cut-Off Date. Written notice
of termination will be given to each Certificateholder, and the final
distribution will be made only upon surrender and cancellation of the
Certificates at an office or agency appointed by the Trustee which will be
specified in the notice of termination.

111484 GSR 2004-7
Trust Agreement

                                     3A1-5
<PAGE>

            Any such repurchase of Mortgage Loans and property acquired in
respect of the Mortgage Loans shall be made at the Termination Price.

            Unless the certificate of authentication hereon has been executed by
the Certificate Registrar, by manual signature, this Certificate shall not be
entitled to any benefit under the Trust Agreement or be valid for any purpose.

            THIS CERTIFICATE AND THE TRUST AGREEMENT SHALL BE CONSTRUED IN
ACCORDANCE WITH, AND GOVERNED BY, THE LAWS OF THE STATE OF NEW YORK.

            The Trustee has executed this Certificate on behalf of the Trust as
Trustee under the Trust Agreement, and the Trustee shall be liable hereunder
only in respect of the assets of the Trust.

            Capitalized terms used herein and not defined herein shall have the
meaning assigned to them in the Trust Agreement.

            In the event that the terms of this Certificate conflict with the
terms of the Trust Agreement, the terms of the Trust Agreement shall control.

111484 GSR 2004-7
Trust Agreement

                                     3A1-6
<PAGE>

            IN WITNESS WHEREOF, the Trustee has caused this Certificate to be
duly executed.

Dated: June 30, 2004                 JPMORGAN CHASE BANK,
                                       not in its individual capacity but solely
                                       as Trustee

                                     By:________________________________________
                                        AUTHORIZED OFFICER

                          CERTIFICATE OF AUTHENTICATION

THIS IS ONE OF THE CLASS 3A1 CERTIFICATES REFERRED TO IN THE WITHIN-MENTIONED
TRUST AGREEMENT.

                                        JPMORGAN CHASE BANK,
                                          as Certificate Registrar

                                        By:_____________________________________
                                           AUTHORIZED OFFICER

111484 GSR 2004-7
Trust Agreement

                                     3A1-7
<PAGE>

                                  ABBREVIATIONS

The following abbreviations, when used in the inscription on the face of this
Certificate, shall be construed as though they were written out in full
according to applicable laws or regulations:

<TABLE>
<S>                                               <C>
TEN COM--as tenants in common                     UNIF GIFT MIN ACT--____Custodian_______________
TEN ENT--as tenants by the                                             (Cust)         (Minor)
   entireties

JT TEN--as joint tenants with rights of           Under Uniform Gifts to Minors Act______________
survivorship and not as Tenants in Common                                             (State)
</TABLE>

                    Additional abbreviations may also be used
                          though not in the above list.

111484 GSR 2004-7
Trust Agreement

                                     3A1-8
<PAGE>

                                FORM OF TRANSFER

FOR VALUE RECEIVED, the undersigned hereby sells, assigns and transfers unto

________________________________________________________________________________

PLEASE INSERT SOCIAL SECURITY OR
OTHER IDENTIFYING NUMBER OF
ASSIGNEE _______________________________________________________________________

________________________________________________________________________________

            (Please print or typewrite name and address of assignee)

the within Certificate and does hereby irrevocably constitute and, appoint
__________________ (Attorney) to transfer the said Certificate in the
Certificate Register of the within-named Trust, with full power of substitution
in the premises.

Dated: ________________________________      ___________________________________

                                             NOTICE: The signature to this
                                             assignment must correspond with the
                                             name as written upon the face of
                                             this certificate in every
                                             particular without alteration or
                                             enlargement or any change whatever.

_______________________________________

SIGNATURE GUARANTEED: The signature
must be guaranteed by a commercial bank
or trust company or by a member firm of
the New York Stock Exchange or another
national certificates exchange.
Notarized or witnessed signatures are
not acceptable.

111484 GSR 2004-7
Trust Agreement

                                      3A1-9
<PAGE>

                            DISTRIBUTION INSTRUCTIONS

The assignee should include the following for purposes of distribution:

Distribution shall be made, by wire transfer or otherwise, in immediately
available funds, to ___________________________, for the account of
_____________________, account number _________________, or if mailed by check
to ______________________________. Applicable reports and statements should be
mailed to __________________________. This information is provided by
____________________________, the assignee named above, or _______________, as
agent.

111484 GSR 2004-7
Trust Agreement

                                     3A1-10
<PAGE>

                                   EXHIBIT 4A1

                          FORM OF CLASS 4A1 CERTIFICATE

                     GS MORTGAGE SECURITIES CORP., DEPOSITOR
                MORTGAGE PASS-THROUGH CERTIFICATES, SERIES 2004-7
                              CLASS 4A1 CERTIFICATE

UNLESS THIS CERTIFICATE IS PRESENTED BY AN AUTHORIZED REPRESENTATIVE OF THE
DEPOSITORY TRUST COMPANY, A NEW YORK CORPORATION ("DTC"), TO THE TRUSTEE OR ITS
AGENT FOR REGISTRATION OF TRANSFER, EXCHANGE, OR PAYMENT, AND ANY CERTIFICATE
ISSUED IS REGISTERED IN THE NAME OF CEDE & CO. OR IN SUCH OTHER NAME AS IS
REQUESTED BY AN AUTHORIZED REPRESENTATIVE OF DTC (AND ANY PAYMENT MADE TO CEDE &
CO. OR TO SUCH OTHER ENTITY AS IS REQUESTED BY AN AUTHORIZED REPRESENTATIVE OF
DTC), ANY TRANSFER, PLEDGE, OR OTHER USE HEREOF FOR VALUE OR OTHERWISE BY OR TO
ANY PERSON IS WRONGFUL INASMUCH AS THE REGISTERED OWNER HEREOF, CEDE & CO., HAS
AN INTEREST HEREIN.

THIS CLASS 4A1 CERTIFICATE IS SUBORDINATED TO THE EXTENT DESCRIBED HEREIN AND IN
THE TRUST AGREEMENT REFERENCED HEREIN.

THIS CLASS 4A1 CERTIFICATE REPRESENTS A REMIC REGULAR INTEREST FOR FEDERAL
INCOME TAX PURPOSES.

THE PRINCIPAL OF THIS CLASS 4A1 CERTIFICATE IS SUBJECT TO PREPAYMENT FROM TIME
TO TIME WITHOUT SURRENDER OF OR NOTATION ON THIS CERTIFICATE. ACCORDINGLY, THE
CERTIFICATE PRINCIPAL BALANCE OF THIS CERTIFICATE MAY BE LESS THAN THAT SET
FORTH BELOW. ANYONE ACQUIRING THIS CERTIFICATE MAY ASCERTAIN ITS CURRENT
CERTIFICATE PRINCIPAL BALANCE BY INQUIRY OF THE TRUSTEE.

111484 GSR 2004-7
Trust Agreement

                                      4A-1
<PAGE>

                     GS MORTGAGE SECURITIES CORP., DEPOSITOR
                MORTGAGE PASS-THROUGH CERTIFICATES, SERIES 2004-7
                              CLASS 4A1 CERTIFICATE

INITIAL CERTIFICATE RATE                     APPROXIMATE AGGREGATE INITIAL
PER ANNUM: 4.873%(6)                         CERTIFICATE PRINCIPAL BALANCE OF
                                             THE CLASS 4A1 CERTIFICATES AS OF
                                             THE CLOSING DATE: $96,059,000

PERCENTAGE INTEREST: 100%

MINIMUM DENOMINATION:                        $25,000 AND $1 IN EXCESS OF $25,000

DATE OF THE TRUST                            APPROXIMATE AGGREGATE
AGREEMENT:                                   SCHEDULED PRINCIPAL BALANCE AS
JUNE 1, 2004                                 OF THE CUT-OFF DATE OF THE
                                             MORTGAGE LOANS HELD BY THE
                                             TRUST: $699,836,637

CLOSING DATE:                                SERVICERS:
JUNE 30, 2004                                COUNTRYWIDE HOME LOANS SERVICING LP
                                             NATIONAL CITY MORTGAGE CO.

FIRST DISTRIBUTION DATE:
JULY 26, 2004

FINAL SCHEDULED                              TRUSTEE: JPMORGAN CHASE BANK
DISTRIBUTION DATE:                           CUSTODIAN: JPMORGAN CHASE BANK
JUNE 25, 2034

NO. 1                                        CUSIP NUMBER: 36228F 4S 2
                                             ISIN NUMBER: US36228F4S25

-----------------

(6) For each Distribution Date, the Certificate Rate for the Class 4A1
Certificates will equal a variable rate determined in accordance with the Trust
Agreement.

111484 GSR 2004-7
Trust Agreement

                                     4A-2
<PAGE>

                     GS MORTGAGE SECURITIES CORP., DEPOSITOR
                MORTGAGE PASS-THROUGH CERTIFICATES, SERIES 2004-7
                              CLASS 4A1 CERTIFICATE

      evidencing a beneficial ownership interest in a Trust consisting of the
      entire beneficial ownership of a pool of certain hybrid adjustable-rate
      single family, fully amortizing, first lien Mortgage Loans formed and sold
      by

                          GS MORTGAGE SECURITIES CORP.

THIS CERTIFICATE DOES NOT REPRESENT AN OBLIGATION OF, OR INTEREST IN, AND IS NOT
GUARANTEED BY, GS MORTGAGE SECURITIES CORP., THE SERVICERS, THE TRUSTEE, THE
CUSTODIAN OR ANY OF THEIR AFFILIATES. NEITHER THIS CERTIFICATE NOR THE
UNDERLYING MORTGAGE LOANS ARE GUARANTEED BY ANY AGENCY OR INSTRUMENTALITY OF THE
UNITED STATES.

THIS CERTIFIES THAT:

                                   CEDE & CO.

is the registered owner of the Percentage Interest evidenced by this Certificate
in the Class 3A2 Certificates (the "Class 4A1 Certificates") issued by the trust
(the "Trust") created pursuant to a Trust Agreement, dated as specified above
(the "Trust Agreement"), between GS Mortgage Certificates Corp., as depositor
(hereinafter the "Depositor," which term includes any successor entity under the
Trust Agreement) and JPMorgan Chase Bank, as trustee (in such capacity, the
"Trustee") and custodian (in such capacity, the "Custodian"), a summary of
certain of the pertinent provisions of which is set forth hereafter. The Trust
consists primarily of a pool of Mortgage Loans. This Certificate is issued under
and is subject to the terms, provisions and conditions of the Trust Agreement
and also is subject to certain terms and conditions set forth in the Sale
Agreements and the Servicing Agreements, to which the Sale Agreements and the
Servicing Agreements the Holder of this Certificate, by virtue of the acceptance
hereof assents and by which such Certificateholder is bound.

            Distributions on this Certificate (including the final distribution
on this Certificate) will be made out of the related Available Distribution
Amount, to the extent and subject to the limitations set forth in the Trust
Agreement, on the 25th day of each month, or if such day is not a Business Day,
the next succeeding Business Day, beginning in June 2004 (each, a "Distribution
Date"), commencing on the first Distribution Date specified above, to the Person
in whose name this Certificate is registered at the close of business on the
last Business Day of the Interest Accrual Period related to such Distribution
Date (the "Record Date"). Distributions on this Certificate will generally be
made from collections on the Mortgage Loans. All sums distributable on this
Certificate are payable in the coin or currency of the United States of America
as at the time of payment is legal tender for the payment of public and private
debts.

            Distributions on this Certificate will be paid in accordance with
the terms of the Trust Agreement, the Sale Agreements and the Servicing
Agreements. Distributions allocated to

111484 GSR 2004-7
Trust Agreement

                                      4A-3
<PAGE>

this Certificate on any Distribution Date will be an amount equal to this
Certificate's Percentage Interest of the related Available Distribution Amount
to be distributed on this Class of Certificates as of such Distribution Date,
with a final distribution to be made upon retirement of this Certificate as set
forth in the Trust Agreement.

            This Certificate is one of a duly authorized issue of Certificates
designated as Mortgage Pass-Through Certificates, Series 2004-7 (herein called
the "Certificates"), and representing a Percentage Interest in the Class of
Certificates specified on the face hereof equal to the quotient, expressed as a
percentage, obtained by dividing the denomination of this Certificate specified
on the face hereof by the aggregate Certificate Principal Balance of all the
Class 3A2 Certificates. The Certificates are issued in multiple Classes
designated as specifically set forth in the Trust Agreement. The Certificates
will evidence in the aggregate 100% of the beneficial ownership of the Trust.

            Realized Losses and interest shortfalls on the Mortgage Loans shall
be allocated among the Classes of Certificates on the applicable Distribution
Date in the manner set forth in the Trust Agreement. To the extent provided in
the Trust Agreement, with respect to Realized Losses and interest shortfalls,
the Subordinate Certificates will be subordinated to the Senior Certificates and
each of the Subordinate Certificates will be subordinated to each of the other
Subordinate Certificates with a lower numerical class designation, if any. All
Realized Losses and interest shortfalls on the Mortgage Loans allocated to any
Class of Certificates will be allocated pro rata among the outstanding
Certificates of such Class, as described in the Trust Agreement.

            The Certificates are limited in right of payment to certain
collections and recoveries respecting the Mortgage Loans, all as more
specifically set forth in the Trust Agreement. As provided in the Trust
Agreement, withdrawals from the Collection Accounts, the Certificate Account and
related accounts shall be made from time to time for purposes other than
distributions to Holders, such purposes including reimbursement of Advances
made, or certain expenses incurred, with respect to the Mortgage Loans and
administration of the Trust.

            All distributions or allocations made with respect to each Class on
any Distribution Date shall be allocated in accordance with the Trust Agreement.
Payment shall be made either (1) by check mailed to the address of each
Certificateholder as it appears in the Certificate Register on the Record Date
immediately prior to such Distribution Date or (2) with respect to the
Certificates other than the Residual Certificates, by wire transfer of
immediately available funds to the account of a Certificateholder at a bank or
other entity having appropriate facilities therefor, if such Certificateholder
shall have so notified the Trustee in writing by the Record Date immediately
prior to such Distribution Date and such Certificateholder is the registered
owner of an initial Certificate Principal Balance or Notional Amount of at least
$1,000,000. The Trustee may charge the Certificateholder a fee for any payment
made by wire transfer. Final distribution on the Certificates will be made only
upon surrender of the Certificates at the offices of the Certificate Registrar
set forth in the notice of such final distribution.

            The Trust Agreement permits, with certain exceptions therein
provided, the amendment thereof and the modification of the rights and
obligations of the Depositor, the

111484 GSR 2004-7
Trust Agreement

                                     4A-4
<PAGE>

Trustee and the Custodian and the rights of the Certificateholders under the
Trust Agreement at any time by the Depositor, the Trustee and the Custodian with
the consent of the Certificateholders entitled to at least 51% of the Voting
Rights. Any such consent by the Holder of this Certificate shall be conclusive
and binding on such Certificateholder and upon all future Holders of this
Certificate and of any Certificate issued upon the transfer hereof or in
exchange herefor or in lieu hereof whether or not notation of such consent is
made upon this Certificate. The Trust Agreement also permits the amendment
thereof, in certain limited circumstances, without the consent of the
Certificateholders.

            The Certificates are issuable in fully registered form only, without
coupons, in denominations specified in the Trust Agreement. As provided in the
Trust Agreement and subject to any limitations on transfer of this Certificate
by a Depository or its nominee and certain limitations set forth in the Trust
Agreement, the transfer of this Certificate is registrable in the Certificate
Register upon surrender of this Certificate for registration of transfer at the
principal Corporate Trust Office of the Trustee or such other offices or
agencies appointed by the Trustee for that purpose and such other locations
provided in the Trust Agreement, duly endorsed by or accompanied by an
assignment in the form below or other written instrument of transfer in form
satisfactory to, the Trustee and the Certificate Registrar duly executed by the
Certificateholder hereof, or such Certificateholder's attorney duly authorized
in writing, and thereupon one or more new Certificates of the same Class in the
same aggregate Certificate Principal Balance will be issued to the designated
transferee or transferees.

            As provided in the Trust Agreement and subject to certain
limitations therein set forth, this Certificate is exchangeable for a new
Certificate of the same Class in the same denomination. No service charge will
be made for any such registration of transfer or exchange, but the Trustee may
require payment of a sum sufficient to cover any tax or other governmental
charge that may be imposed in connection with any transfer or exchange of
Certificates.

            The Depositor, the Trustee, the Custodian and the Certificate
Registrar and any agent of the Depositor, the Trustee, the Custodian or the
Certificate Registrar may treat the Person in whose name this Certificate is
registered as the owner hereof for all purposes, and none of the Depositor, the
Trustee, the Custodian, the Certificate Registrar or any such agent shall be
affected by notice to the contrary.

            The obligations created by the Trust Agreement will terminate upon
payment to the Certificateholders of all amounts held in the Collection Accounts
and the Certificate Account required to be paid to the Certificateholders
pursuant to the Trust Agreement, following the earlier of: (i) the final payment
or other liquidation (or any advance with respect thereto) of the last Mortgage
Loan remaining in the Trust or the disposition of all property acquired upon
foreclosure of any such Mortgage Loan and (ii) the repurchase of all the assets
of the Trust by Countrywide Home Loans Servicing LP or the Depositor, in
accordance with the Trust Agreement when the aggregate Scheduled Principal
Balance of the Mortgage Loans equals 10% or less of the aggregate Scheduled
Principal Balance of the Mortgage Loans as of the Cut-Off Date. Written notice
of termination will be given to each Certificateholder, and the final
distribution will be made only upon surrender and cancellation of the
Certificates at an office or agency appointed by the Trustee which will be
specified in the notice of termination.

111484 GSR 2004-7
Trust Agreement

                                     4A-5
<PAGE>

            Any such repurchase of Mortgage Loans and property acquired in
respect of the Mortgage Loans shall be made at the Termination Price.

            Unless the certificate of authentication hereon has been executed by
the Certificate Registrar, by manual signature, this Certificate shall not be
entitled to any benefit under the Trust Agreement or be valid for any purpose.

            THIS CERTIFICATE AND THE TRUST AGREEMENT SHALL BE CONSTRUED IN
ACCORDANCE WITH, AND GOVERNED BY, THE LAWS OF THE STATE OF NEW YORK.

            The Trustee has executed this Certificate on behalf of the Trust as
Trustee under the Trust Agreement, and the Trustee shall be liable hereunder
only in respect of the assets of the Trust.

            Capitalized terms used herein and not defined herein shall have the
meaning assigned to them in the Trust Agreement.

            In the event that the terms of this Certificate conflict with the
terms of the Trust Agreement, the terms of the Trust Agreement shall control.

111484 GSR 2004-7
Trust Agreement

                                     4A-6
<PAGE>

            IN WITNESS WHEREOF, the Trustee has caused this Certificate to be
duly executed.

Dated: June 30, 2004

                                           JPMORGAN CHASE BANK,
                                             not in its individual capacity but
                                             solely as Trustee

                                           By:__________________________________
                                             AUTHORIZED OFFICER

                          CERTIFICATE OF AUTHENTICATION

THIS IS ONE OF THE CLASS 4A1 CERTIFICATES REFERRED TO IN THE WITHIN-MENTIONED
TRUST AGREEMENT.

                                             JPMORGAN CHASE BANK,
                                               as Certificate Registrar

                                             By:________________________________
                                                AUTHORIZED OFFICER

111484 GSR 2004-7
Trust Agreement

                                     4A-7
<PAGE>

                                  ABBREVIATIONS

The following abbreviations, when used in the inscription on the face of this
Certificate, shall be construed as though they were written out in full
according to applicable laws or regulations:

<TABLE>
<S>                                              <C>
TEN COM--as tenants in common                    UNIF GIFT MIN ACT--____Custodian________________
TEN ENT--as tenants by the                                            (Cust)          (Minor)
   entireties

JT TEN--as joint tenants with rights of          Under Uniform Gifts to Minors Act_______________
survivorship and not as Tenants in Common                                             (State)
</TABLE>

                    Additional abbreviations may also be used
                          though not in the above list.

111484 GSR 2004-7
Trust Agreement

                                     4A-8
<PAGE>

                                FORM OF TRANSFER

FOR VALUE RECEIVED, the undersigned hereby sells, assigns and transfers unto

________________________________________________________________________________

PLEASE INSERT SOCIAL SECURITY OR
OTHER IDENTIFYING NUMBER OF
ASSIGNEE _______________________________________________________________________

________________________________________________________________________________

            (Please print or typewrite name and address of assignee)

the within Certificate and does hereby irrevocably constitute and, appoint
__________________ (Attorney) to transfer the said Certificate in the
Certificate Register of the within-named Trust, with full power of substitution
in the premises.

Dated: ________________________________      ___________________________________

                                             NOTICE: The signature to this
                                             assignment must correspond with the
                                             name as written upon the face of
                                             this certificate in every
                                             particular without alteration or
                                             enlargement or any change whatever.

_______________________________________

SIGNATURE GUARANTEED: The signature
must be guaranteed by a commercial bank
or trust company or by a member firm of
the New York Stock Exchange or another
national certificates exchange.
Notarized or witnessed signatures are
not acceptable.

111484 GSR 2004-7
Trust Agreement

                                      4A-9
<PAGE>

                            DISTRIBUTION INSTRUCTIONS

The assignee should include the following for purposes of distribution:

Distribution shall be made, by wire transfer or otherwise, in immediately
available funds, to ___________________________, for the account of
_____________________, account number _________________, or if mailed by check
to ______________________________. Applicable reports and statements should be
mailed to __________________________. This information is provided by
____________________________, the assignee named above, or _______________, as
agent.

111484 GSR 2004-7
Trust Agreement

                                     4A-10
<PAGE>

                                   EXHIBIT B1

                          FORM OF CLASS B1 CERTIFICATE

                     GS MORTGAGE SECURITIES CORP., DEPOSITOR
                MORTGAGE PASS-THROUGH CERTIFICATES, SERIES 2004-7
                              CLASS B1 CERTIFICATE

UNLESS THIS CERTIFICATE IS PRESENTED BY AN AUTHORIZED REPRESENTATIVE OF THE
DEPOSITORY TRUST COMPANY, A NEW YORK CORPORATION ("DTC"), TO THE TRUSTEE OR ITS
AGENT FOR REGISTRATION OF TRANSFER, EXCHANGE, OR PAYMENT, AND ANY CERTIFICATE
ISSUED IS REGISTERED IN THE NAME OF CEDE & CO. OR IN SUCH OTHER NAME AS IS
REQUESTED BY AN AUTHORIZED REPRESENTATIVE OF DTC (AND ANY PAYMENT MADE TO CEDE &
CO. OR TO SUCH OTHER ENTITY AS IS REQUESTED BY AN AUTHORIZED REPRESENTATIVE OF
DTC), ANY TRANSFER, PLEDGE, OR OTHER USE HEREOF FOR VALUE OR OTHERWISE BY OR TO
ANY PERSON IS WRONGFUL INASMUCH AS THE REGISTERED OWNER HEREOF, CEDE & CO., HAS
AN INTEREST HEREIN.

THIS CLASS B1 CERTIFICATE IS SUBORDINATED TO THE EXTENT DESCRIBED HEREIN AND IN
THE TRUST AGREEMENT REFERENCED HEREIN.

THIS CLASS B1 CERTIFICATE REPRESENTS A REMIC REGULAR INTEREST FOR FEDERAL INCOME
TAX PURPOSES.

THE PRINCIPAL OF THIS CLASS B1 CERTIFICATE IS SUBJECT TO PREPAYMENT FROM TIME TO
TIME WITHOUT SURRENDER OF OR NOTATION ON THIS CERTIFICATE. ACCORDINGLY, THE
CERTIFICATE PRINCIPAL BALANCE OF THIS CERTIFICATE MAY BE LESS THAN THAT SET
FORTH BELOW. ANYONE ACQUIRING THIS CERTIFICATE MAY ASCERTAIN ITS CURRENT
CERTIFICATE PRINCIPAL BALANCE BY INQUIRY OF THE TRUSTEE.

111484 GSR 2004-7
Trust Agreement

                                      B1-1
<PAGE>

                     GS MORTGAGE SECURITIES CORP., DEPOSITOR
                MORTGAGE PASS-THROUGH CERTIFICATES, SERIES 2004-7
                              CLASS B1 CERTIFICATE

INITIAL CERTIFICATE RATE                  APPROXIMATE INITIAL CERTIFICATE
PER ANNUM: 3.948%(7)                      PRINCIPAL BALANCE OF THE CLASS B1
                                          CERTIFICATES: $11,899,000

PERCENTAGE INTEREST:  100%

MINIMUM DENOMINATION:                     $250,000 AND $1 IN EXCESS OF $250,000

DATE OF THE TRUST                         APPROXIMATE AGGREGATE SCHEDULED
AGREEMENT:                                PRINCIPAL BALANCE AS OF THE CUT-OFF
JUNE 1, 2004                              DATE OF THE MORTGAGE LOANS HELD
                                          BY THE TRUST: $699,836,637

CLOSING DATE:                             SERVICERS:
JUNE 30, 2004                             COUNTRYWIDE HOME LOANS
                                              SERVICING LP
                                          NATIONAL CITY MORTGAGE CO.

FIRST DISTRIBUTION DATE:
JULY 26, 2004

FINAL SCHEDULED                           TRUSTEE: JPMORGAN CHASE BANK
DISTRIBUTION DATE:                        CUSTODIAN: JPMORGAN CHASE BANK
JUNE 25, 2034

NO. 1                                     CUSIP NUMBER: 36228F 4T 0
                                          ISIN NUMBER: US36228F4T08

----------------------

(7) For each Distribution Date, the Certificate Rate for the Class B1
Certificates will equal a variable rate determined in accordance with the Trust
Agreement.

111484 GSR 2004-7
Trust Agreement

                                      B1-2
<PAGE>

                     GS MORTGAGE SECURITIES CORP., DEPOSITOR
                MORTGAGE PASS-THROUGH CERTIFICATES, SERIES 2004-7
                              CLASS B1 CERTIFICATE

      evidencing a beneficial ownership interest in a Trust consisting of the
      entire beneficial ownership of a pool of certain hybrid adjustable-rate
      single family, fully amortizing, first lien Mortgage Loans formed and sold
      by

                          GS MORTGAGE SECURITIES CORP.

THIS CERTIFICATE DOES NOT REPRESENT AN OBLIGATION OF OR INTEREST IN, AND IS NOT
GUARANTEED BY, GS MORTGAGE SECURITIES CORP., THE SERVICERS, THE TRUSTEE, THE
CUSTODIAN OR ANY OF THEIR AFFILIATES. NEITHER THIS CERTIFICATE NOR THE
UNDERLYING MORTGAGE LOANS ARE GUARANTEED BY ANY AGENCY OR INSTRUMENTALITY OF THE
UNITED STATES.

THIS CERTIFIES THAT:

                                   CEDE & CO.

is the registered owner of the Percentage Interest evidenced by this Certificate
in the Class B1 Certificates (the "Class B1 Certificates") issued by the trust
(the "Trust") created pursuant to a Trust Agreement, dated as specified above
(the "Trust Agreement"), between GS Mortgage Certificates Corp., as depositor
(hereinafter the "Depositor," which term includes any successor entity under the
Trust Agreement) and JPMorgan Chase Bank, as trustee (in such capacity, the
"Trustee") and custodian (in such capacity, the "Custodian"), a summary of
certain of the pertinent provisions of which is set forth hereafter. The Trust
consists primarily of a pool of Mortgage Loans. This Certificate is issued under
and is subject to the terms, provisions and conditions of the Trust Agreement
and also is subject to certain terms and conditions set forth in the Sale
Agreements and the Servicing Agreements, to which the Sale Agreements and the
Servicing Agreements the Holder of this Certificate, by virtue of the acceptance
hereof assents and by which such Certificateholder is bound.

            Distributions on this Certificate (including the final distribution
on this Certificate) will be made out of the related Available Distribution
Amount, to the extent and subject to the limitations set forth in the Trust
Agreement, on the 25th day of each month, or if such day is not a Business Day,
the next succeeding Business Day, beginning in June 2004 (each, a "Distribution
Date"), commencing on the first Distribution Date specified above, to the Person
in whose name this Certificate is registered at the close of business on the
last Business Day of the Interest Accrual Period related to such Distribution
Date (the "Record Date"). Distributions on this Certificate will generally be
made from collections on the Mortgage Loans. All sums distributable on this
Certificate are payable in the coin or currency of the United States of America
as at the time of payment is legal tender for the payment of public and private
debts.

            Distributions on this Certificate will be paid in accordance with
the terms of the Trust Agreement, the Sale Agreements and the Servicing
Agreements. Distributions allocated to

111484 GSR 2004-7
Trust Agreement

                                      B1-3
<PAGE>

this Certificate on any Distribution Date will be an amount equal to this
Certificate's Percentage Interest of the related Available Distribution to be
distributed on this Class of Certificates as of such Distribution Date, with a
final distribution to be made upon retirement of this Certificate as set forth
in the Trust Agreement.

            This Certificate is one of a duly authorized issue of Certificates
designated as Mortgage Pass-Through Certificates, Series 2004-7 (herein called
the "Certificates"), and representing a Percentage Interest in the Class of
Certificates specified on the face hereof equal to the quotient, expressed as a
percentage, obtained by dividing the denomination of this Certificate specified
on the face hereof by the aggregate Certificate Principal Balance of all the
Class B1 Certificates. The Certificates are issued in multiple Classes
designated as specifically set forth in the Trust Agreement. The Certificates
will evidence in the aggregate 100% of the beneficial ownership of the Trust.

            Realized Losses and interest shortfalls on the Mortgage Loans shall
be allocated among the Classes of Certificates on the applicable Distribution
Date in the manner set forth in the Trust Agreement. To the extent provided in
the Trust Agreement, with respect to Realized Losses and interest shortfalls,
the Subordinate Certificates will be subordinated to the Senior Certificates and
each of the Subordinate Certificates will be subordinated to each of the other
Subordinate Certificates with a lower numerical class designation, if any. All
Realized Losses and interest shortfalls on the Mortgage Loans allocated to any
Class of Certificates will be allocated pro rata among the outstanding
Certificates of such Class, as described in the Trust Agreement.

            The Certificates are limited in right of payment to certain
collections and recoveries respecting the Mortgage Loans, all as more
specifically set forth in the Trust Agreement. As provided in the Trust
Agreement, withdrawals from the Collection Accounts, the Certificate Account and
related accounts shall be made from time to time for purposes other than
distributions to Holders, such purposes including reimbursement of Advances
made, or certain expenses incurred, with respect to the Mortgage Loans and
administration of the Trust.

            All distributions or allocations made with respect to each Class on
any Distribution Date shall be allocated in accordance with the Trust Agreement.
Payment shall be made either (1) by check mailed to the address of each
Certificateholder as it appears in the Certificate Register on the Record Date
immediately prior to such Distribution Date or (2) with respect to the
Certificates other than the Residual Certificates, by wire transfer of
immediately available funds to the account of a Certificateholder at a bank or
other entity having appropriate facilities therefor, if such Certificateholder
shall have so notified the Trustee in writing by the Record Date immediately
prior to such Distribution Date and such Certificateholder is the registered
owner of an initial Certificate Principal Balance or Notional Amount of at least
$1,000,000. The Trustee may charge the Certificateholder a fee for any payment
made by wire transfer. Final distribution on the Certificates will be made only
upon surrender of the Certificates at the offices of the Certificate Registrar
set forth in the notice of such final distribution.

            The Trust Agreement permits, with certain exceptions therein
provided, the amendment thereof and the modification of the rights and
obligations of the Depositor, the

111484 GSR 2004-7
Trust Agreement

                                      B1-4
<PAGE>

Trustee and the Custodian and the rights of the Certificateholders under the
Trust Agreement at any time by the Depositor, the Trustee and the Custodian with
the consent of the Certificateholders entitled to at least 51% of the Voting
Rights. Any such consent by the Holder of this Certificate shall be conclusive
and binding on such Certificateholder and upon all future Holders of this
Certificate and of any Certificate issued upon the transfer hereof or in
exchange herefor or in lieu hereof whether or not notation of such consent is
made upon this Certificate. The Trust Agreement also permits the amendment
thereof, in certain limited circumstances, without the consent of the
Certificateholders.

            The Certificates are issuable in fully registered form only, without
coupons, in denominations specified in the Trust Agreement. As provided in the
Trust Agreement and subject to any limitations on transfer of this Certificate
by a Depository or its nominee and certain limitations set forth in the Trust
Agreement, the transfer of this Certificate is registrable in the Certificate
Register upon surrender of this Certificate for registration of transfer at the
principal Corporate Trust Office of the Trustee or such other offices or
agencies appointed by the Trustee for that purpose and such other locations
provided in the Trust Agreement, duly endorsed by or accompanied by an
assignment in the form below or other written instrument of transfer in form
satisfactory to, the Trustee and the Certificate Registrar duly executed by the
Certificateholder hereof, or such Certificateholder's attorney duly authorized
in writing, and thereupon one or more new Certificates of the same Class in the
same aggregate Certificate Principal Balance will be issued to the designated
transferee or transferees.

            As provided in the Trust Agreement and subject to certain
limitations therein set forth, this Certificate is exchangeable for a new
Certificate of the same Class in the same denomination. No service charge will
be made for any such registration of transfer or exchange, but the Trustee may
require payment of a sum sufficient to cover any tax or other governmental
charge that may be imposed in connection with any transfer or exchange of
Certificates.

            The Depositor, the Trustee, the Custodian and the Certificate
Registrar and any agent of the Depositor, the Trustee, the Custodian or the
Certificate Registrar may treat the Person in whose name this Certificate is
registered as the owner hereof for all purposes, and none of the Depositor, the
Trustee, the Custodian, the Certificate Registrar or any such agent shall be
affected by notice to the contrary.

            The obligations created by the Trust Agreement will terminate upon
payment to the Certificateholders of all amounts held in the Collection Accounts
and the Certificate Account required to be paid to the Certificateholders
pursuant to the Trust Agreement, following the earlier of: (i) the final payment
or other liquidation (or any advance with respect thereto) of the last Mortgage
Loan remaining in the Trust or the disposition of all property acquired upon
foreclosure of any such Mortgage Loan and (ii) the repurchase of all the assets
of the Trust by Countrywide Home Loans Servicing LP or the Depositor, in
accordance with the Trust Agreement when the aggregate Scheduled Principal
Balance of the Mortgage Loans equals 10% or less of the aggregate Scheduled
Principal Balance of the Mortgage Loans as of the Cut-Off Date. Written notice
of termination will be given to each Certificateholder, and the final
distribution will be made only upon surrender and cancellation of the
Certificates at an office or agency appointed by the Trustee which will be
specified in the notice of termination.

111484 GSR 2004-7
Trust Agreement

                                      B1-5
<PAGE>

            Any such repurchase of Mortgage Loans and property acquired in
respect of the Mortgage Loans shall be made at the Termination Price.

            Unless the certificate of authentication hereon has been executed by
the Certificate Registrar, by manual signature, this Certificate shall not be
entitled to any benefit under the Trust Agreement or be valid for any purpose.

            THIS CERTIFICATE AND THE TRUST AGREEMENT SHALL BE CONSTRUED IN
ACCORDANCE WITH, AND GOVERNED BY, THE LAWS OF THE STATE OF NEW YORK.

            The Trustee has executed this Certificate on behalf of the Trust as
Trustee under the Trust Agreement, and the Trustee shall be liable hereunder
only in respect of the assets of the Trust.

            Capitalized terms used herein and not defined herein shall have the
meaning assigned to them in the Trust Agreement.

            In the event that the terms of this Certificate conflict with the
terms of the Trust Agreement, the terms of the Trust Agreement shall control.

111484 GSR 2004-7
Trust Agreement

                                      B1-6
<PAGE>

            IN WITNESS WHEREOF, the Trustee has caused this Certificate to be
duly executed.

Dated: June 30, 2004                       JPMORGAN CHASE BANK,
                                             not in its individual capacity but
                                             solely as Trustee

                                            By:_________________________________
                                               AUTHORIZED OFFICER

                          CERTIFICATE OF AUTHENTICATION

THIS IS ONE OF THE CLASS B1 CERTIFICATES REFERRED TO IN THE WITHIN-MENTIONED
TRUST AGREEMENT.

                                              JPMORGAN CHASE BANK,
                                                as Certificate Registrar

                                              By:_______________________________
                                                 AUTHORIZED SIGNATORY

111484 GSR 2004-7
Trust Agreement

                                      B1-7
<PAGE>

                                  ABBREVIATIONS

The following abbreviations, when used in the inscription on the face of this
Certificate, shall be construed as though they were written out in full
according to applicable laws or regulations:

<TABLE>
<S>                                               <C>
TEN COM--as tenants in common                     UNIF GIFT MIN ACT--____Custodian_______________
TEN ENT--as tenants by the                                             (Cust)         (Minor)
   entireties

JT TEN--as joint tenants with rights of           Under Uniform Gifts to Minors Act______________
survivorship and not as Tenants in Common                                              (State)
</TABLE>

                    Additional abbreviations may also be used
                          though not in the above list.

111484 GSR 2004-7
Trust Agreement

                                      B1-8
<PAGE>

                                FORM OF TRANSFER

FOR VALUE RECEIVED, the undersigned hereby sells, assigns and transfers unto

________________________________________________________________________________

PLEASE INSERT SOCIAL SECURITY OR
OTHER IDENTIFYING NUMBER OF
ASSIGNEE _______________________________________________________________________

________________________________________________________________________________

            (Please print or typewrite name and address of assignee)

the within Certificate and does hereby irrevocably constitute and, appoint
__________________ (Attorney) to transfer the said Certificate in the
Certificate Register of the within-named Trust, with full power of substitution
in the premises.

Dated:   ______________________              ___________________________________

                                             NOTICE: The signature to this
                                             assignment must correspond with the
                                             name as written upon the face of
                                             this certificate in every
                                             particular without alteration or
                                             enlargement or any change whatever.

__________________________________

SIGNATURE GUARANTEED: The signature
must be guaranteed by a commercial
bank or trust company or by a
member firm of the New York Stock
Exchange or another national
certificates exchange. Notarized or
witnessed signatures are not
acceptable.

111484 GSR 2004-7
Trust Agreement

                                      B1-9
<PAGE>

                            DISTRIBUTION INSTRUCTIONS

The assignee should include the following for purposes of distribution:
Distribution shall be made, by wire transfer or otherwise, in immediately
available funds, to ___________________________, for the account of
_____________________, account number _________________, or if mailed by check
to ______________________________. Applicable reports and statements should be
mailed to __________________________. This information is provided by
____________________________, the assignee named above, or _______________, as
agent.

111484 GSR 2004-7
Trust Agreement

                                     B1-10
<PAGE>

                                   EXHIBIT B2

                          FORM OF CLASS B2 CERTIFICATE

                     GS MORTGAGE SECURITIES CORP., DEPOSITOR
                MORTGAGE PASS-THROUGH CERTIFICATES, SERIES 2004-7
                              CLASS B2 CERTIFICATE

UNLESS THIS CERTIFICATE IS PRESENTED BY AN AUTHORIZED REPRESENTATIVE OF THE
DEPOSITORY TRUST COMPANY, A NEW YORK CORPORATION ("DTC"), TO THE TRUSTEE OR ITS
AGENT FOR REGISTRATION OF TRANSFER, EXCHANGE, OR PAYMENT, AND ANY CERTIFICATE
ISSUED IS REGISTERED IN THE NAME OF CEDE & CO. OR IN SUCH OTHER NAME AS IS
REQUESTED BY AN AUTHORIZED REPRESENTATIVE OF DTC (AND ANY PAYMENT MADE TO CEDE &
CO. OR TO SUCH OTHER ENTITY AS IS REQUESTED BY AN AUTHORIZED REPRESENTATIVE OF
DTC), ANY TRANSFER, PLEDGE, OR OTHER USE HEREOF FOR VALUE OR OTHERWISE BY OR TO
ANY PERSON IS WRONGFUL INASMUCH AS THE REGISTERED OWNER HEREOF, CEDE & CO., HAS
AN INTEREST HEREIN.

THIS CLASS B2 CERTIFICATE IS SUBORDINATED TO THE EXTENT DESCRIBED HEREIN AND IN
THE TRUST AGREEMENT REFERENCED HEREIN.

THIS CLASS B2 CERTIFICATE REPRESENTS A REMIC REGULAR INTEREST FOR FEDERAL INCOME
TAX PURPOSES.

THE PRINCIPAL OF THIS CLASS B2 CERTIFICATE IS SUBJECT TO PREPAYMENT FROM TIME TO
TIME WITHOUT SURRENDER OF OR NOTATION ON THIS CERTIFICATE. ACCORDINGLY, THE
CERTIFICATE PRINCIPAL BALANCE OF THIS CERTIFICATE MAY BE LESS THAN THAT SET
FORTH BELOW. ANYONE ACQUIRING THIS CERTIFICATE MAY ASCERTAIN ITS CURRENT
CERTIFICATE PRINCIPAL BALANCE BY INQUIRY OF THE TRUSTEE.

111484 GSR 2004-7
Trust Agreement

                                      B2-1
<PAGE>

                     GS MORTGAGE SECURITIES CORP., DEPOSITOR
                MORTGAGE PASS-THROUGH CERTIFICATES, SERIES 2004-7
                              CLASS B2 CERTIFICATE

INITIAL CERTIFICATE RATE                  APPROXIMATE INITIAL CERTIFICATE
PER ANNUM: 3.948%(8)                      PRINCIPAL BALANCE OF THE CLASS B2
                                          CERTIFICATES: $4,899,000

PERCENTAGE INTEREST: 100%

MINIMUM DENOMINATION:                     $250,000 AND $1 IN EXCESS OF $250,000

DATE OF THE TRUST                         APPROXIMATE AGGREGATE SCHEDULED
AGREEMENT:                                PRINCIPAL BALANCE AS OF THE CUT-OFF
JUNE 1, 2004                              DATE OF THE MORTGAGE LOANS HELD BY THE
                                          TRUST: $699,836,637

CLOSING DATE:                             SERVICERS:
JUNE 30, 2004                             COUNTRYWIDE HOME LOANS SERVICING LP
                                          NATIONAL CITY MORTGAGE CO.

FIRST DISTRIBUTION DATE:
JULY 26, 2004

FINAL SCHEDULED                           TRUSTEE: JPMORGAN CHASE BANK
DISTRIBUTION DATE:                        CUSTODIAN: JPMORGAN CHASE BANK
JUNE 25, 2034

NO. 1                                     CUSIP NUMBER: 36228F 4U 7
                                          ISIN NUMBER: US36228F4U70
----------------------
(8)   For each Distribution Date, the Certificate Rate for the Class B2
Certificates will equal a variable rate determined in accordance with the Trust
Agreement.

111484 GSR 2004-7
Trust Agreement

                                      B2-2
<PAGE>

                     GS MORTGAGE SECURITIES CORP., DEPOSITOR
                MORTGAGE PASS-THROUGH CERTIFICATES, SERIES 2004-7
                              CLASS B2 CERTIFICATE

      evidencing a beneficial ownership interest in a Trust consisting of the
      entire beneficial ownership of a pool of certain hybrid adjustable-rate
      single family, fully amortizing, first lien Mortgage Loans formed and sold
      by

                          GS MORTGAGE SECURITIES CORP.

THIS CERTIFICATE DOES NOT REPRESENT AN OBLIGATION OF OR INTEREST IN, AND IS NOT
GUARANTEED BY, GS MORTGAGE SECURITIES CORP., THE SERVICERS, THE TRUSTEE, THE
CUSTODIAN OR ANY OF THEIR AFFILIATES. NEITHER THIS CERTIFICATE NOR THE
UNDERLYING MORTGAGE LOANS ARE GUARANTEED BY ANY AGENCY OR INSTRUMENTALITY OF THE
UNITED STATES.

THIS CERTIFIES THAT:

                                   CEDE & CO.

is the registered owner of the Percentage Interest evidenced by this Certificate
in the Class B2 Certificates (the "Class B2 Certificates") issued by the trust
(the "Trust") created pursuant to a Trust Agreement, dated as specified above
(the "Trust Agreement"), between GS Mortgage Certificates Corp., as depositor
(hereinafter the "Depositor," which term includes any successor entity under the
Trust Agreement) and JPMorgan Chase Bank, as trustee (in such capacity, the
"Trustee") and custodian (in such capacity, the "Custodian"), a summary of
certain of the pertinent provisions of which is set forth hereafter. The Trust
consists primarily of a pool of Mortgage Loans. This Certificate is issued under
and is subject to the terms, provisions and conditions of the Trust Agreement
and also is subject to certain terms and conditions set forth in the Sale
Agreements and the Servicing Agreements, to which the Sale Agreements and the
Servicing Agreements the Holder of this Certificate, by virtue of the acceptance
hereof assents and by which such Certificateholder is bound.

            Distributions on this Certificate (including the final distribution
on this Certificate) will be made out of the related Available Distribution
Amount, to the extent and subject to the limitations set forth in the Trust
Agreement, on the 25th day of each month, or if such day is not a Business Day,
the next succeeding Business Day, beginning in June 2004 (each, a "Distribution
Date"), commencing on the first Distribution Date specified above, to the Person
in whose name this Certificate is registered at the close of business on the
last Business Day of the Interest Accrual Period related to such Distribution
Date (the "Record Date"). Distributions on this Certificate will generally be
made from collections on the Mortgage Loans. All sums distributable on this
Certificate are payable in the coin or currency of the United States of America
as at the time of payment is legal tender for the payment of public and private
debts.

            Distributions on this Certificate will be paid in accordance with
the terms of the Trust Agreement, the Sale Agreements and the Servicing
Agreements. Distributions allocated to

111484 GSR 2004-7
Trust Agreement

                                      B2-3
<PAGE>

this Certificate on any Distribution Date will be an amount equal to this
Certificate's Percentage Interest of the related Available Distribution to be
distributed on this Class of Certificates as of such Distribution Date, with a
final distribution to be made upon retirement of this Certificate as set forth
in the Trust Agreement.

            This Certificate is one of a duly authorized issue of Certificates
designated as Mortgage Pass-Through Certificates, Series 2004-7 (herein called
the "Certificates"), and representing a Percentage Interest in the Class of
Certificates specified on the face hereof equal to the quotient, expressed as a
percentage, obtained by dividing the denomination of this Certificate specified
on the face hereof by the aggregate Certificate Principal Balance of all the
Class B2 Certificates. The Certificates are issued in multiple Classes
designated as specifically set forth in the Trust Agreement. The Certificates
will evidence in the aggregate 100% of the beneficial ownership of the Trust.

            Realized Losses and interest shortfalls on the Mortgage Loans shall
be allocated among the Classes of Certificates on the applicable Distribution
Date in the manner set forth in the Trust Agreement. To the extent provided in
the Trust Agreement, with respect to Realized Losses and interest shortfalls,
the Subordinate Certificates will be subordinated to the Senior Certificates and
each of the Subordinate Certificates will be subordinated to each of the other
Subordinate Certificates with a lower numerical class designation, if any. All
Realized Losses and interest shortfalls on the Mortgage Loans allocated to any
Class of Certificates will be allocated pro rata among the outstanding
Certificates of such Class, as described in the Trust Agreement.

            The Certificates are limited in right of payment to certain
collections and recoveries respecting the Mortgage Loans, all as more
specifically set forth in the Trust Agreement. As provided in the Trust
Agreement, withdrawals from the Collection Accounts, the Certificate Account and
related accounts shall be made from time to time for purposes other than
distributions to Holders, such purposes including reimbursement of Advances
made, or certain expenses incurred, with respect to the Mortgage Loans and
administration of the Trust.

            All distributions or allocations made with respect to each Class on
any Distribution Date shall be allocated in accordance with the Trust Agreement.
Payment shall be made either (1) by check mailed to the address of each
Certificateholder as it appears in the Certificate Register on the Record Date
immediately prior to such Distribution Date or (2) with respect to the
Certificates other than the Residual Certificates, by wire transfer of
immediately available funds to the account of a Certificateholder at a bank or
other entity having appropriate facilities therefor, if such Certificateholder
shall have so notified the Trustee in writing by the Record Date immediately
prior to such Distribution Date and such Certificateholder is the registered
owner of an initial Certificate Principal Balance or Notional Amount of at least
$1,000,000. The Trustee may charge the Certificateholder a fee for any payment
made by wire transfer. Final distribution on the Certificates will be made only
upon surrender of the Certificates at the offices of the Certificate Registrar
set forth in the notice of such final distribution.

            The Trust Agreement permits, with certain exceptions therein
provided, the amendment thereof and the modification of the rights and
obligations of the Depositor, the

111484 GSR 2004-7
Trust Agreement

                                      B2-4
<PAGE>

Trustee and the Custodian and the rights of the Certificateholders under the
Trust Agreement at any time by the Depositor, the Trustee and the Custodian with
the consent of the Certificateholders entitled to at least 51% of the Voting
Rights. Any such consent by the Holder of this Certificate shall be conclusive
and binding on such Certificateholder and upon all future Holders of this
Certificate and of any Certificate issued upon the transfer hereof or in
exchange herefor or in lieu hereof whether or not notation of such consent is
made upon this Certificate. The Trust Agreement also permits the amendment
thereof, in certain limited circumstances, without the consent of the
Certificateholders.

            The Certificates are issuable in fully registered form only, without
coupons, in denominations specified in the Trust Agreement. As provided in the
Trust Agreement and subject to any limitations on transfer of this Certificate
by a Depository or its nominee and certain limitations set forth in the Trust
Agreement, the transfer of this Certificate is registrable in the Certificate
Register upon surrender of this Certificate for registration of transfer at the
principal Corporate Trust Office of the Trustee or such other offices or
agencies appointed by the Trustee for that purpose and such other locations
provided in the Trust Agreement, duly endorsed by or accompanied by an
assignment in the form below or other written instrument of transfer in form
satisfactory to, the Trustee and the Certificate Registrar duly executed by the
Certificateholder hereof, or such Certificateholder's attorney duly authorized
in writing, and thereupon one or more new Certificates of the same Class in the
same aggregate Certificate Principal Balance will be issued to the designated
transferee or transferees.

            As provided in the Trust Agreement and subject to certain
limitations therein set forth, this Certificate is exchangeable for a new
Certificate of the same Class in the same denomination. No service charge will
be made for any such registration of transfer or exchange, but the Trustee may
require payment of a sum sufficient to cover any tax or other governmental
charge that may be imposed in connection with any transfer or exchange of
Certificates.

            The Depositor, the Trustee, the Custodian and the Certificate
Registrar and any agent of the Depositor, the Trustee, the Custodian or the
Certificate Registrar may treat the Person in whose name this Certificate is
registered as the owner hereof for all purposes, and none of the Depositor, the
Trustee, the Custodian, the Certificate Registrar or any such agent shall be
affected by notice to the contrary.

            The obligations created by the Trust Agreement will terminate upon
payment to the Certificateholders of all amounts held in the Collection Accounts
and the Certificate Account required to be paid to the Certificateholders
pursuant to the Trust Agreement, following the earlier of: (i) the final payment
or other liquidation (or any advance with respect thereto) of the last Mortgage
Loan remaining in the Trust or the disposition of all property acquired upon
foreclosure of any such Mortgage Loan and (ii) the repurchase of all the assets
of the Trust by Countrywide Home Loans Servicing LP or the Depositor, in
accordance with the Trust Agreement when the aggregate Scheduled Principal
Balance of the Mortgage Loans equals 10% or less of the aggregate Scheduled
Principal Balance of the Mortgage Loans as of the Cut-Off Date. Written notice
of termination will be given to each Certificateholder, and the final
distribution will be made only upon surrender and cancellation of the
Certificates at an office or agency appointed by the Trustee which will be
specified in the notice of termination.

111484 GSR 2004-7
Trust Agreement

                                      B2-5
<PAGE>

            Any such repurchase of Mortgage Loans and property acquired in
respect of the Mortgage Loans shall be made at the Termination Price.

            Unless the certificate of authentication hereon has been executed by
the Certificate Registrar, by manual signature, this Certificate shall not be
entitled to any benefit under the Trust Agreement or be valid for any purpose.

            THIS CERTIFICATE AND THE TRUST AGREEMENT SHALL BE CONSTRUED IN
ACCORDANCE WITH, AND GOVERNED BY, THE LAWS OF THE STATE OF NEW YORK.

            The Trustee has executed this Certificate on behalf of the Trust as
Trustee under the Trust Agreement, and the Trustee shall be liable hereunder
only in respect of the assets of the Trust.

            Capitalized terms used herein and not defined herein shall have the
meaning assigned to them in the Trust Agreement.

            In the event that the terms of this Certificate conflict with the
terms of the Trust Agreement, the terms of the Trust Agreement shall control.

111484 GSR 2004-7
Trust Agreement

                                      B2-6
<PAGE>

            IN WITNESS WHEREOF, the Trustee has caused this Certificate to be
duly executed.

Dated: June 30, 2004

                                          JPMORGAN CHASE BANK,
                                            not in its individual capacity but
                                            solely as Trustee

                                          By:___________________________________
                                             AUTHORIZED OFFICER

                          CERTIFICATE OF AUTHENTICATION

THIS IS ONE OF THE CLASS B2 CERTIFICATES REFERRED TO IN THE WITHIN-MENTIONED
TRUST AGREEMENT.

                                              JPMORGAN CHASE BANK,
                                                as Certificate Registrar

                                              By:_______________________________
                                                 AUTHORIZED SIGNATORY

111484 GSR 2004-7
Trust Agreement

                                      B2-7
<PAGE>

                                  ABBREVIATIONS

The following abbreviations, when used in the inscription on the face of this
Certificate, shall be construed as though they were written out in full
according to applicable laws or regulations:

TEN COM -- as tenants in common        UNIF GIFT MIN ACT -- ____Custodian_______
TEN ENT -- as tenants by the                                  (Cust)     (Minor)
  entireties

JT TEN -- as joint tenants with     Under Uniform Gifts to Minors Act___________
rights of survivorship and not                                           (State)
as Tenants in Common

                    Additional abbreviations may also be used
                          though not in the above list.

111484 GSR 2004-7
Trust Agreement

                                      B2-8
<PAGE>

                                FORM OF TRANSFER

FOR VALUE RECEIVED, the undersigned hereby sells, assigns and transfers unto

________________________________________________________________________________

PLEASE INSERT SOCIAL SECURITY OR
OTHER IDENTIFYING NUMBER OF
ASSIGNEE _______________________________________________________________________

________________________________________________________________________________

            (Please print or typewrite name and address of assignee)

the within Certificate and does hereby irrevocably constitute and, appoint
__________________ (Attorney) to transfer the said Certificate in the
Certificate Register of the within-named Trust, with full power of substitution
in the premises.

Dated: ______________________             ______________________________________

                                          NOTICE: The signature to this
                                          assignment must correspond with the
                                          name as written upon the face of this
                                          certificate in every particular
                                          without alteration or enlargement or
                                          any change whatever.

_____________________________________

SIGNATURE GUARANTEED: The signature
must be guaranteed by a commercial
bank or trust company or by a member
firm of the New York Stock Exchange or
another national certificates
exchange. Notarized or witnessed
signatures are not acceptable.

111484 GSR 2004-7
Trust Agreement

                                      B2-9
<PAGE>

                            DISTRIBUTION INSTRUCTIONS

The assignee should include the following for purposes of distribution:

Distribution shall be made, by wire transfer or otherwise, in immediately
available funds, to ___________________________, for the account of
_____________________, account number _________________, or if mailed by check
to ______________________________. Applicable reports and statements should be
mailed to __________________________. This information is provided by
____________________________, the assignee named above, or _______________, as
agent.

111484 GSR 2004-7
Trust Agreement

                                     B2-10
<PAGE>

                                   EXHIBIT B3

                          FORM OF CLASS B3 CERTIFICATE

                     GS MORTGAGE SECURITIES CORP., DEPOSITOR
                MORTGAGE PASS-THROUGH CERTIFICATES, SERIES 2004-7
                              CLASS B3 CERTIFICATE

UNLESS THIS CERTIFICATE IS PRESENTED BY AN AUTHORIZED REPRESENTATIVE OF THE
DEPOSITORY TRUST COMPANY, A NEW YORK CORPORATION ("DTC"), TO THE TRUSTEE OR ITS
AGENT FOR REGISTRATION OF TRANSFER, EXCHANGE, OR PAYMENT, AND ANY CERTIFICATE
ISSUED IS REGISTERED IN THE NAME OF CEDE & CO. OR IN SUCH OTHER NAME AS IS
REQUESTED BY AN AUTHORIZED REPRESENTATIVE OF DTC (AND ANY PAYMENT MADE TO CEDE &
CO. OR TO SUCH OTHER ENTITY AS IS REQUESTED BY AN AUTHORIZED REPRESENTATIVE OF
DTC), ANY TRANSFER, PLEDGE, OR OTHER USE HEREOF FOR VALUE OR OTHERWISE BY OR TO
ANY PERSON IS WRONGFUL INASMUCH AS THE REGISTERED OWNER HEREOF, CEDE & CO., HAS
AN INTEREST HEREIN.

THIS CLASS B3 CERTIFICATE IS SUBORDINATED TO THE EXTENT DESCRIBED HEREIN AND IN
THE TRUST AGREEMENT REFERENCED HEREIN.

THIS CLASS B3 CERTIFICATE REPRESENTS A REMIC REGULAR INTEREST FOR FEDERAL INCOME
TAX PURPOSES.

THE PRINCIPAL OF THIS CLASS B3 CERTIFICATE IS SUBJECT TO PREPAYMENT FROM TIME TO
TIME WITHOUT SURRENDER OF OR NOTATION ON THIS CERTIFICATE. ACCORDINGLY, THE
CERTIFICATE PRINCIPAL BALANCE OF THIS CERTIFICATE MAY BE LESS THAN THAT SET
FORTH BELOW. ANYONE ACQUIRING THIS CERTIFICATE MAY ASCERTAIN ITS CURRENT
CERTIFICATE PRINCIPAL BALANCE BY INQUIRY OF THE TRUSTEE.

111484 GSR 2004-7
Trust Agreement

                                      B3-1
<PAGE>

                     GS MORTGAGE SECURITIES CORP., DEPOSITOR
                MORTGAGE PASS-THROUGH CERTIFICATES, SERIES 2004-7
                              CLASS B3 CERTIFICATE

INITIAL CERTIFICATE RATE                  APPROXIMATE INITIAL CERTIFICATE
PER ANNUM:  3.948%(9)                     PRINCIPAL BALANCE OF THE CLASS B3
                                          CERTIFICATES: $2,099,000

PERCENTAGE INTEREST: 100%

MINIMUM DENOMINATION:                     $250,000 AND $1 IN EXCESS OF $250,000

DATE OF THE TRUST                         APPROXIMATE AGGREGATE SCHEDULED
AGREEMENT:                                PRINCIPAL BALANCE AS OF THE CUT-OFF
JUNE 1, 2004                              DATE OF THE MORTGAGE LOANS HELD BY THE
                                          TRUST: $699,836,637

CLOSING DATE:                             SERVICERS:
JUNE 30, 2004                             COUNTRYWIDE HOME LOANS SERVICING LP
                                          NATIONAL CITY MORTGAGE CO.

FIRST DISTRIBUTION DATE:
JULY 26, 2004

FINAL SCHEDULED                           TRUSTEE: JPMORGAN CHASE BANK
DISTRIBUTION DATE:                        CUSTODIAN: JPMORGAN CHASE BANK
JUNE 25, 2034

NO. 1                                     CUSIP NUMBER: 36228F 4V 5
                                          ISIN NUMBER: US36228F4V53

----------------------
(9)   For each Distribution Date, the Certificate Rate for the Class B3
Certificates will equal a variable rate determined in accordance with the Trust
Agreement..

111484 GSR 2004-7
Trust Agreement

                                      B3-2
<PAGE>

                     GS MORTGAGE SECURITIES CORP., DEPOSITOR
                MORTGAGE PASS-THROUGH CERTIFICATES, SERIES 2004-7
                              CLASS B3 CERTIFICATE

      evidencing a beneficial ownership interest in a Trust consisting of the
      entire beneficial ownership of a pool of certain hybrid adjustable-rate
      single family, fully amortizing, first lien Mortgage Loans formed and sold
      by

                          GS MORTGAGE SECURITIES CORP.

THIS CERTIFICATE DOES NOT REPRESENT AN OBLIGATION OF OR INTEREST IN, AND IS NOT
GUARANTEED BY, GS MORTGAGE SECURITIES CORP., THE SERVICERS, THE TRUSTEE, THE
CUSTODIAN OR ANY OF THEIR AFFILIATES. NEITHER THIS CERTIFICATE NOR THE
UNDERLYING MORTGAGE LOANS ARE GUARANTEED BY ANY AGENCY OR INSTRUMENTALITY OF THE
UNITED STATES.

THIS CERTIFIES THAT:

                                   CEDE & CO.

is the registered owner of the Percentage Interest evidenced by this Certificate
in the Class B3 Certificates (the "Class B3 Certificates") issued by the trust
(the "Trust") created pursuant to a Trust Agreement, dated as specified above
(the "Trust Agreement"), between GS Mortgage Certificates Corp., as depositor
(hereinafter the "Depositor," which term includes any successor entity under the
Trust Agreement) and JPMorgan Chase Bank, as trustee (in such capacity, the
"Trustee") and custodian (in such capacity, the "Custodian"), a summary of
certain of the pertinent provisions of which is set forth hereafter. The Trust
consists primarily of a pool of Mortgage Loans. This Certificate is issued under
and is subject to the terms, provisions and conditions of the Trust Agreement
and also is subject to certain terms and conditions set forth in the Sale
Agreements and the Servicing Agreements, to which the Sale Agreements and the
Servicing Agreements the Holder of this Certificate, by virtue of the acceptance
hereof assents and by which such Certificateholder is bound.

            Distributions on this Certificate (including the final distribution
on this Certificate) will be made out of the related Available Distribution
Amount, to the extent and subject to the limitations set forth in the Trust
Agreement, on the 25th day of each month, or if such day is not a Business Day,
the next succeeding Business Day, beginning in June 2004 (each, a "Distribution
Date"), commencing on the first Distribution Date specified above, to the Person
in whose name this Certificate is registered at the close of business on the
last Business Day of the Interest Accrual Period related to such Distribution
Date (the "Record Date"). Distributions on this Certificate will generally be
made from collections on the Mortgage Loans. All sums distributable on this
Certificate are payable in the coin or currency of the United States of America
as at the time of payment is legal tender for the payment of public and private
debts.

            Distributions on this Certificate will be paid in accordance with
the terms of the Trust Agreement, the Sale Agreements and the Servicing
Agreements. Distributions allocated to

111484 GSR 2004-7
Trust Agreement

                                      B3-3
<PAGE>

this Certificate on any Distribution Date will be an amount equal to this
Certificate's Percentage Interest of the related Available Distribution to be
distributed on this Class of Certificates as of such Distribution Date, with a
final distribution to be made upon retirement of this Certificate as set forth
in the Trust Agreement.

            This Certificate is one of a duly authorized issue of Certificates
designated as Mortgage Pass-Through Certificates, Series 2004-7 (herein called
the "Certificates"), and representing a Percentage Interest in the Class of
Certificates specified on the face hereof equal to the quotient, expressed as a
percentage, obtained by dividing the denomination of this Certificate specified
on the face hereof by the aggregate Certificate Principal Balance of all the
Class B3 Certificates. The Certificates are issued in multiple Classes
designated as specifically set forth in the Trust Agreement. The Certificates
will evidence in the aggregate 100% of the beneficial ownership of the Trust.

            Realized Losses and interest shortfalls on the Mortgage Loans shall
be allocated among the Classes of Certificates on the applicable Distribution
Date in the manner set forth in the Trust Agreement. To the extent provided in
the Trust Agreement, with respect to Realized Losses and interest shortfalls,
the Subordinate Certificates will be subordinated to the Senior Certificates and
each of the Subordinate Certificates will be subordinated to each of the other
Subordinate Certificates with a lower numerical class designation, if any. All
Realized Losses and interest shortfalls on the Mortgage Loans allocated to any
Class of Certificates will be allocated pro rata among the outstanding
Certificates of such Class, as described in the Trust Agreement.

            The Certificates are limited in right of payment to certain
collections and recoveries respecting the Mortgage Loans, all as more
specifically set forth in the Trust Agreement. As provided in the Trust
Agreement, withdrawals from the Collection Accounts, the Certificate Account and
related accounts shall be made from time to time for purposes other than
distributions to Holders, such purposes including reimbursement of Advances
made, or certain expenses incurred, with respect to the Mortgage Loans and
administration of the Trust.

            All distributions or allocations made with respect to each Class on
any Distribution Date shall be allocated in accordance with the Trust Agreement.
Payment shall be made either (1) by check mailed to the address of each
Certificateholder as it appears in the Certificate Register on the Record Date
immediately prior to such Distribution Date or (2) with respect to the
Certificates other than the Residual Certificates, by wire transfer of
immediately available funds to the account of a Certificateholder at a bank or
other entity having appropriate facilities therefor, if such Certificateholder
shall have so notified the Trustee in writing by the Record Date immediately
prior to such Distribution Date and such Certificateholder is the registered
owner of an initial Certificate Principal Balance or Notional Amount of at least
$1,000,000. The Trustee may charge the Certificateholder a fee for any payment
made by wire transfer. Final distribution on the Certificates will be made only
upon surrender of the Certificates at the offices of the Certificate Registrar
set forth in the notice of such final distribution.

            The Trust Agreement permits, with certain exceptions therein
provided, the amendment thereof and the modification of the rights and
obligations of the Depositor, the

111484 GSR 2004-7
Trust Agreement

                                      B3-4
<PAGE>

Trustee and the Custodian and the rights of the Certificateholders under the
Trust Agreement at any time by the Depositor, the Trustee and the Custodian with
the consent of the Certificateholders entitled to at least 51% of the Voting
Rights. Any such consent by the Holder of this Certificate shall be conclusive
and binding on such Certificateholder and upon all future Holders of this
Certificate and of any Certificate issued upon the transfer hereof or in
exchange herefor or in lieu hereof whether or not notation of such consent is
made upon this Certificate. The Trust Agreement also permits the amendment
thereof, in certain limited circumstances, without the consent of the
Certificateholders.

            The Certificates are issuable in fully registered form only, without
coupons, in denominations specified in the Trust Agreement. As provided in the
Trust Agreement and subject to any limitations on transfer of this Certificate
by a Depository or its nominee and certain limitations set forth in the Trust
Agreement, the transfer of this Certificate is registrable in the Certificate
Register upon surrender of this Certificate for registration of transfer at the
principal Corporate Trust Office of the Trustee or such other offices or
agencies appointed by the Trustee for that purpose and such other locations
provided in the Trust Agreement, duly endorsed by or accompanied by an
assignment in the form below or other written instrument of transfer in form
satisfactory to, the Trustee and the Certificate Registrar duly executed by the
Certificateholder hereof, or such Certificateholder's attorney duly authorized
in writing, and thereupon one or more new Certificates of the same Class in the
same aggregate Certificate Principal Balance will be issued to the designated
transferee or transferees.

            As provided in the Trust Agreement and subject to certain
limitations therein set forth, this Certificate is exchangeable for a new
Certificate of the same Class in the same denomination. No service charge will
be made for any such registration of transfer or exchange, but the Trustee may
require payment of a sum sufficient to cover any tax or other governmental
charge that may be imposed in connection with any transfer or exchange of
Certificates.

            The Depositor, the Trustee, the Custodian and the Certificate
Registrar and any agent of the Depositor, the Trustee, the Custodian or the
Certificate Registrar may treat the Person in whose name this Certificate is
registered as the owner hereof for all purposes, and none of the Depositor, the
Trustee, the Custodian, the Certificate Registrar or any such agent shall be
affected by notice to the contrary.

            The obligations created by the Trust Agreement will terminate upon
payment to the Certificateholders of all amounts held in the Collection Accounts
and the Certificate Account required to be paid to the Certificateholders
pursuant to the Trust Agreement, following the earlier of: (i) the final payment
or other liquidation (or any advance with respect thereto) of the last Mortgage
Loan remaining in the Trust or the disposition of all property acquired upon
foreclosure of any such Mortgage Loan and (ii) the repurchase of all the assets
of the Trust by Countrywide Home Loans Servicing LP or the Depositor, in
accordance with the Trust Agreement when the aggregate Scheduled Principal
Balance of the Mortgage Loans equals 10% or less of the aggregate Scheduled
Principal Balance of the Mortgage Loans as of the Cut-Off Date. Written notice
of termination will be given to each Certificateholder, and the final
distribution will be made only upon surrender and cancellation of the
Certificates at an office or agency appointed by the Trustee which will be
specified in the notice of termination.

111484 GSR 2004-7
Trust Agreement

                                      B3-5
<PAGE>

            Any such repurchase of Mortgage Loans and property acquired in
respect of the Mortgage Loans shall be made at the Termination Price.

            Unless the certificate of authentication hereon has been executed by
the Certificate Registrar, by manual signature, this Certificate shall not be
entitled to any benefit under the Trust Agreement or be valid for any purpose.

            THIS CERTIFICATE AND THE TRUST AGREEMENT SHALL BE CONSTRUED IN
ACCORDANCE WITH, AND GOVERNED BY, THE LAWS OF THE STATE OF NEW YORK.

            The Trustee has executed this Certificate on behalf of the Trust as
Trustee under the Trust Agreement, and the Trustee shall be liable hereunder
only in respect of the assets of the Trust.

            Capitalized terms used herein and not defined herein shall have the
meaning assigned to them in the Trust Agreement.

            In the event that the terms of this Certificate conflict with the
terms of the Trust Agreement, the terms of the Trust Agreement shall control.

111484 GSR 2004-7
Trust Agreement

                                      B3-6
<PAGE>

            IN WITNESS WHEREOF, the Trustee has caused this Certificate to be
duly executed.

Dated: June 30, 2004

                                          JPMORGAN CHASE BANK,
                                            not in its individual capacity but
                                            solely as Trustee

                                          By:___________________________________
                                             AUTHORIZED OFFICER

                          CERTIFICATE OF AUTHENTICATION

THIS IS ONE OF THE CLASS B3 CERTIFICATES REFERRED TO IN THE WITHIN-MENTIONED
TRUST AGREEMENT.

                                              JPMORGAN CHASE BANK,
                                                as Certificate Registrar

                                              By:_______________________________
                                                 AUTHORIZED SIGNATORY

111484 GSR 2004-7
Trust Agreement

                                      B3-7
<PAGE>

                                  ABBREVIATIONS

The following abbreviations, when used in the inscription on the face of this
Certificate, shall be construed as though they were written out in full
according to applicable laws or regulations:

TEN COM -- as tenants in common       UNIF GIFT MIN ACT -- ____Custodian________
TEN ENT -- as tenants by the                                 (Cust)      (Minor)
  entireties

JT TEN -- as joint tenants with       Under Uniform Gifts to Minors Act_________
rights of survivorship and not                                           (State)
as Tenants in Common

                    Additional abbreviations may also be used
                          though not in the above list.

111484 GSR 2004-7
Trust Agreement

                                      B3-8
<PAGE>

                                FORM OF TRANSFER

FOR VALUE RECEIVED, the undersigned hereby sells, assigns and transfers unto

________________________________________________________________________________

PLEASE INSERT SOCIAL SECURITY OR
OTHER IDENTIFYING NUMBER OF
ASSIGNEE _______________________________________________________________________

________________________________________________________________________________

            (Please print or typewrite name and address of assignee)

the within Certificate and does hereby irrevocably constitute and, appoint
__________________ (Attorney) to transfer the said Certificate in the
Certificate Register of the within-named Trust, with full power of substitution
in the premises.

Dated: ______________________             ______________________________________

                                          NOTICE: The signature to this
                                          assignment must correspond with the
                                          name as written upon the face of this
                                          certificate in every particular
                                          without alteration or enlargement or
                                          any change whatever.

______________________________________

SIGNATURE GUARANTEED: The signature
must be guaranteed by a commercial
bank or trust company or by a member
firm of the New York Stock Exchange or
another national certificates
exchange. Notarized or witnessed
signatures are not acceptable.

111484 GSR 2004-7
Trust Agreement

                                      B3-9
<PAGE>

                            DISTRIBUTION INSTRUCTIONS

The assignee should include the following for purposes of distribution:

Distribution shall be made, by wire transfer or otherwise, in immediately
available funds, to ___________________________, for the account of
_____________________, account number _________________, or if mailed by check
to ______________________________. Applicable reports and statements should be
mailed to __________________________. This information is provided by
____________________________, the assignee named above, or _______________, as
agent.

111484 GSR 2004-7
Trust Agreement

                                     B3-10
<PAGE>

                                   EXHIBIT B4

                          FORM OF CLASS B4 CERTIFICATE

                     GS MORTGAGE SECURITIES CORP., DEPOSITOR
                MORTGAGE PASS-THROUGH CERTIFICATES, SERIES 2004-7
                              CLASS B4 CERTIFICATE

THE CERTIFICATE EVIDENCED HEREBY HAS NOT BEEN AND WILL NOT BE REGISTERED OR
QUALIFIED UNDER THE SECURITIES ACT OF 1933, AS AMENDED (THE "ACT"), OR THE
SECURITIES LAWS OF ANY STATE AND MAY NOT BE OFFERED, SOLD, PLEDGED, OR OTHERWISE
TRANSFERRED EXCEPT (A)(1) TO A BUYER THAT THE SELLER OF SUCH CERTIFICATE
REASONABLY BELIEVES IS A QUALIFIED INSTITUTIONAL BUYER WITHIN THE MEANING OF
RULE 144A UNDER THE SECURITIES ACT PURCHASING FOR ITS OWN ACCOUNT OR FOR THE
ACCOUNT OF A QUALIFIED INSTITUTIONAL BUYER IN A TRANSACTION MEETING THE
REQUIREMENTS OF RULE 144A OR (2) PURSUANT TO AN EFFECTIVE REGISTRATION STATEMENT
UNDER THE SECURITIES ACT AND (B) IN ACCORDANCE WITH ALL APPLICABLE SECURITIES
LAWS OF THE STATES OF THE UNITED STATES OR ANY OTHER APPLICABLE JURISDICTION.

THIS CERTIFICATE MAY NOT BE PURCHASED BY A TRANSFEREE THAT IS OR IS ACTING ON
BEHALF OF OR INVESTING THE ASSETS OF (A) AN EMPLOYEE BENEFIT PLAN OR OTHER
RETIREMENT ARRANGEMENT, INCLUDING AN INDIVIDUAL RETIREMENT ACCOUNT OR A KEOGH
PLAN, WHICH IS SUBJECT TO THE EMPLOYEE RETIREMENT INCOME SECURITY ACT OF 1974,
AS AMENDED ("ERISA"), SECTION 4975 OF THE INTERNAL REVENUE CODE OF 1986, AS
AMENDED (THE "CODE") (EACH, A "PLAN"), OR A GOVERNMENTAL PLAN AS DEFINED IN
SECTION 3(32) OF ERISA THAT IS SUBJECT TO ANY ESSENTIALLY SIMILAR FEDERAL, STATE
OR LOCAL LAW (A "SIMILAR LAW"), OTHER THAN AN INSURANCE COMPANY USING THE ASSETS
OF ITS GENERAL ACCOUNT UNDER CIRCUMSTANCES WHEREBY SUCH PURCHASE AND THE
SUBSEQUENT HOLDING OF SUCH CERTIFICATE BY SUCH INSURANCE COMPANY WOULD NOT
CONSTITUTE OR RESULT IN A NON-EXEMPT PROHIBITED TRANSACTION WITHIN THE MEANING
OF SECTION 406 OR 407 OF ERISA, SECTION 4975 OF THE CODE, OR A MATERIALLY
SIMILAR CHARACTERIZATION UNDER ANY SIMILAR LAW.

THIS CLASS B4 CERTIFICATE IS SUBORDINATED TO THE EXTENT DESCRIBED HEREIN AND IN
THE TRUST AGREEMENT REFERENCED HEREIN.

THIS CLASS B4 CERTIFICATE REPRESENTS A REMIC REGULAR INTEREST FOR FEDERAL INCOME
TAX PURPOSES.

111484 GSR 2004-7
Trust Agreement

                                      B4-1

<PAGE>

THE PRINCIPAL OF THIS CLASS B4 CERTIFICATE IS SUBJECT TO PREPAYMENT FROM TIME TO
TIME WITHOUT SURRENDER OF OR NOTATION ON THIS CERTIFICATE. ACCORDINGLY, THE
CERTIFICATE PRINCIPAL BALANCE OF THIS CERTIFICATE MAY BE LESS THAN THAT SET
FORTH BELOW. ANYONE ACQUIRING THIS CERTIFICATE MAY ASCERTAIN ITS CURRENT
CERTIFICATE PRINCIPAL BALANCE BY INQUIRY OF THE TRUSTEE.

111484 GSR 2004-7
Trust Agreement

                                      B4-2

<PAGE>

                     GS MORTGAGE SECURITIES CORP., DEPOSITOR
                MORTGAGE PASS-THROUGH CERTIFICATES, SERIES 2004-7
                              CLASS B4 CERTIFICATE

INITIAL CERTIFICATE RATE        APPROXIMATE INITIAL CERTIFICATE
PER ANNUM:  3.948%(10)          PRINCIPAL BALANCE OF THE CLASS B4
                                CERTIFICATES:  $2,100,000

PERCENTAGE INTEREST:  100%

MINIMUM DENOMINATION:           $250,000 AND $1 IN EXCESS OF $250,000

DATE OF THE TRUST               APPROXIMATE AGGREGATE SCHEDULED
AGREEMENT:                      PRINCIPAL BALANCE AS OF THE CUT-OFF
JUNE 1, 2004                    DATE OF THE MORTGAGE LOANS HELD
                                 BY THE TRUST: $699,836,637

CLOSING DATE:                   SERVICERS:
JUNE 30, 2004                   COUNTRYWIDE HOME LOANS
                                    SERVICING LP
                                NATIONAL CITY MORTGAGE CO.

FIRST DISTRIBUTION DATE:
JULY 26, 2004

FINAL SCHEDULED                 TRUSTEE: JPMORGAN CHASE BANK
DISTRIBUTION DATE:              CUSTODIAN: JPMORGAN CHASE BANK
JUNE 25, 2034

NO. 1                           CUSIP NUMBER:36228F 5S 1
                                ISIN NUMBER: US36228F5S16

__________________________
(10) For each Distribution Date, the Certificate Rate for the Class B4
Certificates will equal a variable rate determined in accordance with the Trust
Agreement.

11484 GSR 2004-7
Trust Agreement

                                      B4-3

<PAGE>

                     GS MORTGAGE SECURITIES CORP., DEPOSITOR
                MORTGAGE PASS-THROUGH CERTIFICATES, SERIES 2004-7
                              CLASS B4 CERTIFICATE

      evidencing a beneficial ownership interest in a Trust consisting of the
      entire beneficial ownership of a pool of certain hybrid adjustable-rate
      single family, fully amortizing, first lien Mortgage Loans formed and sold
      by

                          GS MORTGAGE SECURITIES CORP.

THIS CERTIFICATE DOES NOT REPRESENT AN OBLIGATION OF OR INTEREST IN, AND IS NOT
GUARANTEED BY, GS MORTGAGE SECURITIES CORP., THE SERVICERS, THE TRUSTEE, THE
CUSTODIAN OR ANY OF THEIR AFFILIATES. NEITHER THIS CERTIFICATE NOR THE
UNDERLYING MORTGAGE LOANS ARE GUARANTEED BY ANY AGENCY OR INSTRUMENTALITY OF THE
UNITED STATES.

THIS CERTIFIES THAT:

                              GOLDMAN, SACHS & CO.

is the registered owner of the Percentage Interest evidenced by this Certificate
in the Class B4 Certificates (the "Class B4 Certificates") issued by the trust
(the "Trust") created pursuant to a Trust Agreement, dated as specified above
(the "Trust Agreement"), between GS Mortgage Certificates Corp., as depositor
(hereinafter the "Depositor," which term includes any successor entity under the
Trust Agreement) and JPMorgan Chase Bank, as trustee (in such capacity, the
"Trustee") and custodian (in such capacity, the "Custodian"), a summary of
certain of the pertinent provisions of which is set forth hereafter. The Trust
consists primarily of a pool of Mortgage Loans. This Certificate is issued under
and is subject to the terms, provisions and conditions of the Trust Agreement
and also is subject to certain terms and conditions set forth in the Sale
Agreements and the Servicing Agreements, to which the Sale Agreements and the
Servicing Agreements the Holder of this Certificate, by virtue of the acceptance
hereof assents and by which such Certificateholder is bound.

            Distributions on this Certificate (including the final distribution
on this Certificate) will be made out of the related Available Distribution
Amount, to the extent and subject to the limitations set forth in the Trust
Agreement, on the 25th day of each month, or if such day is not a Business Day,
the next succeeding Business Day, beginning in June 2004 (each, a "Distribution
Date"), commencing on the first Distribution Date specified above, to the Person
in whose name this Certificate is registered at the close of business on the
last Business Day of the Interest Accrual Period related to such Distribution
Date (the "Record Date"). Distributions on this Certificate will generally be
made from collections on the Mortgage Loans. All sums distributable on this
Certificate are payable in the coin or currency of the United States of America
as at the time of payment is legal tender for the payment of public and private
debts.

            Distributions on this Certificate will be paid in accordance with
the terms of the Trust Agreement, the Sale Agreements and the Servicing
Agreements. Distributions allocated to

111484 GSR 2004-7
Trust Agreement

                                      B4-4

<PAGE>

this Certificate on any Distribution Date will be an amount equal to this
Certificate's Percentage Interest of the related Available Distribution to be
distributed on this Class of Certificates as of such Distribution Date, with a
final distribution to be made upon retirement of this Certificate as set forth
in the Trust Agreement.

            By receipt of this Certificate, the Holder is deemed to represent
that: (1) it (A) is a Qualified Institutional Buyer, (B) is aware that the sale
of this Certificate to it is being made in reliance on Rule 144A and (C) is
acquiring this Certificate for its own account or for the account of a Qualified
Institutional Buyer, as the case may be and (2) it understands that this
Certificate has not been and will not be registered under the Securities Act and
may not be reoffered, resold, or otherwise transferred except (A) to person who
the Holder reasonably believes is a Qualified Institutional Buyer in a
transaction meeting the requirements of Rule 144A, and (B) in accordance with
all applicable state securities laws.

            This Certificate is one of a duly authorized issue of Certificates
designated as Mortgage Pass-Through Certificates, Series 2004-7 (herein called
the "Certificates"), and representing a Percentage Interest in the Class of
Certificates specified on the face hereof equal to the quotient, expressed as a
percentage, obtained by dividing the denomination of this Certificate specified
on the face hereof by the aggregate Certificate Principal Balance of all the
Class B4 Certificates. The Certificates are issued in multiple Classes
designated as specifically set forth in the Trust Agreement. The Certificates
will evidence in the aggregate 100% of the beneficial ownership of the Trust.

            Realized Losses and interest shortfalls on the Mortgage Loans shall
be allocated among the Classes of Certificates on the applicable Distribution
Date in the manner set forth in the Trust Agreement. To the extent provided in
the Trust Agreement, with respect to Realized Losses and interest shortfalls,
the Subordinate Certificates will be subordinated to the Senior Certificates and
each of the Subordinate Certificates will be subordinated to each of the other
Subordinate Certificates with a lower numerical class designation, if any. All
Realized Losses and interest shortfalls on the Mortgage Loans allocated to any
Class of Certificates will be allocated pro rata among the outstanding
Certificates of such Class, as described in the Trust Agreement.

            The Certificates are limited in right of payment to certain
collections and recoveries respecting the Mortgage Loans, all as more
specifically set forth in the Trust Agreement. As provided in the Trust
Agreement, withdrawals from the Collection Accounts, the Certificate Account and
related accounts shall be made from time to time for purposes other than
distributions to Holders, such purposes including reimbursement of Advances
made, or certain expenses incurred, with respect to the Mortgage Loans and
administration of the Trust.

            All distributions or allocations made with respect to each Class on
any Distribution Date shall be allocated in accordance with the Trust Agreement.
Payment shall be made either (1) by check mailed to the address of each
Certificateholder as it appears in the Certificate Register on the Record Date
immediately prior to such Distribution Date or (2) by wire transfer of
immediately available funds to the account of a Certificateholder at a bank or
other entity having appropriate facilities therefor, if such Certificateholder
shall have so notified the Trustee in writing by the Record Date immediately
prior to such Distribution Date and such

111484 GSR 2004-7
Trust Agreement

                                      B4-5

<PAGE>

Certificateholder is the registered owner of an initial Certificate Principal
Balance or Notional Amount of at least $1,000,000. The Trustee may charge the
Certificateholder a fee for any payment made by wire transfer. Final
distribution on the Certificates will be made only upon surrender of the
Certificates at the offices of the Certificate Registrar set forth in the notice
of such final distribution.

            The Trust Agreement permits, with certain exceptions therein
provided, the amendment thereof and the modification of the rights and
obligations of the Depositor, the Trustee and the Custodian and the rights of
the Certificateholders under the Trust Agreement at any time by the Depositor,
the Trustee and the Custodian with the consent of the Certificateholders
entitled to at least 51% of the Voting Rights. Any such consent by the Holder of
this Certificate shall be conclusive and binding on such Certificateholder and
upon all future Holders of this Certificate and of any Certificate issued upon
the transfer hereof or in exchange herefor or in lieu hereof whether or not
notation of such consent is made upon this Certificate. The Trust Agreement also
permits the amendment thereof, in certain limited circumstances, without the
consent of the Certificateholders.

            The Certificates are issuable in fully registered form only, without
coupons, in denominations specified in the Trust Agreement. As provided in the
Trust Agreement and subject to any limitations on transfer of this Certificate
by a Depository or its nominee and certain limitations set forth in the Trust
Agreement, the transfer of this Certificate is registrable in the Certificate
Register upon surrender of this Certificate for registration of transfer at the
principal Corporate Trust Office of the Trustee or such other offices or
agencies appointed by the Trustee for that purpose and such other locations
provided in the Trust Agreement, duly endorsed by or accompanied by an
assignment in the form below or other written instrument of transfer in form
satisfactory to, the Trustee and the Certificate Registrar duly executed by the
Certificateholder hereof, or such Certificateholder's attorney duly authorized
in writing, and thereupon one or more new Certificates of the same Class in the
same aggregate Certificate Principal Balance will be issued to the designated
transferee or transferees.

            As provided in the Trust Agreement and subject to certain
limitations therein set forth, this Certificate is exchangeable for a new
Certificate of the same Class in the same denomination. No service charge will
be made for any such registration of transfer or exchange, but the Trustee may
require payment of a sum sufficient to cover any tax or other governmental
charge that may be imposed in connection with any transfer or exchange of
Certificates.

            The Depositor, the Trustee, the Custodian and the Certificate
Registrar and any agent of the Depositor, the Trustee, the Custodian or the
Certificate Registrar may treat the Person in whose name this Certificate is
registered as the owner hereof for all purposes, and none of the Depositor, the
Trustee, the Custodian, the Certificate Registrar or any such agent shall be
affected by notice to the contrary.

            The obligations created by the Trust Agreement will terminate upon
payment to the Certificateholders of all amounts held in the Collection Accounts
and the Certificate Account required to be paid to the Certificateholders
pursuant to the Trust Agreement, following the earlier of: (i) the final payment
or other liquidation (or any advance with respect thereto) of the last Mortgage
Loan remaining in the Trust or the disposition of all property acquired upon

111484 GSR 2004-7
Trust Agreement

                                      B4-6

<PAGE>

foreclosure of any such Mortgage Loan and (ii) the repurchase of all the assets
of the Trust by Countrywide Home Loans Servicing LP or the Depositor, in
accordance with the Trust Agreement when the aggregate Scheduled Principal
Balance of the Mortgage Loans equals 10% or less of the aggregate Scheduled
Principal Balance of the Mortgage Loans as of the Cut-Off Date. Written notice
of termination will be given to each Certificateholder, and the final
distribution will be made only upon surrender and cancellation of the
Certificates at an office or agency appointed by the Trustee which will be
specified in the notice of termination.

            Any such repurchase of Mortgage Loans and property acquired in
respect of the Mortgage Loans shall be made at the Termination Price.

            Unless the certificate of authentication hereon has been executed by
the Certificate Registrar, by manual signature, this Certificate shall not be
entitled to any benefit under the Trust Agreement or be valid for any purpose.

            THIS CERTIFICATE AND THE TRUST AGREEMENT SHALL BE CONSTRUED IN
ACCORDANCE WITH, AND GOVERNED BY, THE LAWS OF THE STATE OF NEW YORK.

            The Trustee has executed this Certificate on behalf of the Trust as
Trustee under the Trust Agreement, and the Trustee shall be liable hereunder
only in respect of the assets of the Trust.

            Capitalized terms used herein and not defined herein shall have the
meaning assigned to them in the Trust Agreement.

            In the event that the terms of this Certificate conflict with the
terms of the Trust Agreement, the terms of the Trust Agreement shall control.

111484 GSR 2004-7
Trust Agreement

                                      B4-7

<PAGE>

            IN WITNESS WHEREOF, the Trustee has caused this Certificate to be
duly executed.

Dated: June 30, 2004            JPMORGAN CHASE BANK,
                                    not in its individual capacity but solely as
                                    Trustee

                                By:_____________________________________
                                   AUTHORIZED OFFICER

                          CERTIFICATE OF AUTHENTICATION

THIS IS ONE OF THE CLASS B4 CERTIFICATES REFERRED TO IN THE WITHIN-MENTIONED
TRUST AGREEMENT.

                                JPMORGAN CHASE BANK,
                                   as Certificate Registrar

                                By:_____________________________________
                                   AUTHORIZED SIGNATORY

111484 GSR 2004-7
Trust Agreement

                                      B4-8

<PAGE>

                                  ABBREVIATIONS

The following abbreviations, when used in the inscription on the face of this
Certificate, shall be construed as though they were written out in full
according to applicable laws or regulations:

TEN COM -- as tenants in common      UNIF GIFT MIN ACT --  ____Custodian________
TEN ENT -- as tenants by the                                 (Cust)      (Minor)
   entireties

JT TEN -- as joint tenants with      Under Uniform Gifts to Minors Act__________
rights of survivorship and not                                           (State)
as Tenants in Common

                    Additional abbreviations may also be used
                          though not in the above list.

111484 GSR 2004-7
Trust Agreement

                                      B4-9

<PAGE>

                                FORM OF TRANSFER

FOR VALUE RECEIVED, the undersigned hereby sells, assigns and transfers unto

________________________________________________________________________________

PLEASE INSERT SOCIAL SECURITY OR
OTHER IDENTIFYING NUMBER OF
ASSIGNEE________________________________________________________________________

________________________________________________________________________________

            (Please print or typewrite name and address of assignee)

the within Certificate and does hereby irrevocably constitute and, appoint
__________________ (Attorney) to transfer the said Certificate in the
Certificate Register of the within-named Trust, with full power of substitution
in the premises.

Dated: _________________________             ___________________________________

                                             NOTICE: The signature to this
                                             assignment must correspond with the
                                             name as written upon the face of
                                             this certificate in every
                                             particular without alteration or
                                             enlargement or any change whatever.

________________________________

SIGNATURE GUARANTEED: The
signature must be guaranteed by
a commercial bank or trust
company or by a member firm of
the New York Stock Exchange or
another national certificates
exchange. Notarized or witnessed
signatures are not acceptable.

111484 GSR 2004-7
Trust Agreement

                                      B4-10

<PAGE>

                           DISTRIBUTION INSTRUCTIONS

The assignee should include the following for purposes of distribution:

Distribution shall be made, by wire transfer or otherwise, in immediately
available funds, to ___________________________, for the account of
_____________________, account number _________________, or if mailed by check
to ______________________________. Applicable reports and statements should be
mailed to __________________________. This information is provided by
____________________________, the assignee named above, or _______________, as
agent.

111484 GSR 2004-7
Trust Agreement

                                      B4-11
<PAGE>

                                   EXHIBIT B5

                          FORM OF CLASS B5 CERTIFICATE

                     GS MORTGAGE SECURITIES CORP., DEPOSITOR
                MORTGAGE PASS-THROUGH CERTIFICATES, SERIES 2004-7
                              CLASS B5 CERTIFICATE

THE CERTIFICATE EVIDENCED HEREBY HAS NOT BEEN AND WILL NOT BE REGISTERED OR
QUALIFIED UNDER THE SECURITIES ACT OF 1933, AS AMENDED (THE "ACT"), OR THE
SECURITIES LAWS OF ANY STATE AND MAY NOT BE OFFERED, SOLD, PLEDGED, OR OTHERWISE
TRANSFERRED EXCEPT (A)(1) TO A BUYER THAT THE SELLER OF SUCH CERTIFICATE
REASONABLY BELIEVES IS A QUALIFIED INSTITUTIONAL BUYER WITHIN THE MEANING OF
RULE 144A UNDER THE SECURITIES ACT PURCHASING FOR ITS OWN ACCOUNT OR FOR THE
ACCOUNT OF A QUALIFIED INSTITUTIONAL BUYER IN A TRANSACTION MEETING THE
REQUIREMENTS OF RULE 144A OR (2) PURSUANT TO AN EFFECTIVE REGISTRATION STATEMENT
UNDER THE SECURITIES ACT AND (B) IN ACCORDANCE WITH ALL APPLICABLE SECURITIES
LAWS OF THE STATES OF THE UNITED STATES OR ANY OTHER APPLICABLE JURISDICTION.

THIS CERTIFICATE MAY NOT BE PURCHASED BY A TRANSFEREE THAT IS OR IS ACTING ON
BEHALF OF OR INVESTING THE ASSETS OF (A) AN EMPLOYEE BENEFIT PLAN OR OTHER
RETIREMENT ARRANGEMENT, INCLUDING AN INDIVIDUAL RETIREMENT ACCOUNT OR A KEOGH
PLAN, WHICH IS SUBJECT TO THE EMPLOYEE RETIREMENT INCOME SECURITY ACT OF 1974,
AS AMENDED ("ERISA"), SECTION 4975 OF THE INTERNAL REVENUE CODE OF 1986, AS
AMENDED (THE "CODE") (EACH, A "PLAN"), OR A GOVERNMENTAL PLAN AS DEFINED IN
SECTION 3(32) OF ERISA THAT IS SUBJECT TO ANY ESSENTIALLY SIMILAR FEDERAL, STATE
OR LOCAL LAW (A "SIMILAR LAW"), OTHER THAN AN INSURANCE COMPANY USING THE ASSETS
OF ITS GENERAL ACCOUNT UNDER CIRCUMSTANCES WHEREBY SUCH PURCHASE AND THE
SUBSEQUENT HOLDING OF SUCH CERTIFICATE BY SUCH INSURANCE COMPANY WOULD NOT
CONSTITUTE OR RESULT IN A NON-EXEMPT PROHIBITED TRANSACTION WITHIN THE MEANING
OF SECTION 406 OR 407 OF ERISA, SECTION 4975 OF THE CODE, OR A MATERIALLY
SIMILAR CHARACTERIZATION UNDER ANY SIMILAR LAW.

THIS CLASS B5 CERTIFICATE IS SUBORDINATED TO THE EXTENT DESCRIBED HEREIN AND IN
THE TRUST AGREEMENT REFERENCED HEREIN.

THIS CLASS B5 CERTIFICATE REPRESENTS A REMIC REGULAR INTEREST FOR FEDERAL INCOME
TAX PURPOSES.

THE PRINCIPAL OF THIS CLASS B5 CERTIFICATE IS SUBJECT TO PREPAYMENT FROM TIME TO
TIME WITHOUT SURRENDER OF OR NOTATION

111484 GSR 2004-7
Trust Agreement

                                      B5-1

<PAGE>

ON THIS CERTIFICATE. ACCORDINGLY, THE CERTIFICATE PRINCIPAL BALANCE OF THIS
CERTIFICATE MAY BE LESS THAN THAT SET FORTH BELOW. ANYONE ACQUIRING THIS
CERTIFICATE MAY ASCERTAIN ITS CURRENT CERTIFICATE PRINCIPAL BALANCE BY INQUIRY
OF THE TRUSTEE.

111484 GSR 2004-7
Trust Agreement

                                      B5-2

<PAGE>

                     GS MORTGAGE SECURITIES CORP., DEPOSITOR
                MORTGAGE PASS-THROUGH CERTIFICATES, SERIES 2004-7
                              CLASS B5 CERTIFICATE

INITIAL CERTIFICATE RATE                APPROXIMATE INITIAL CERTIFICATE
PER ANNUM: 3.948%(11)                   PRINCIPAL BALANCE OF THE CLASS B5
                                        CERTIFICATES: $1,749,000

PERCENTAGE INTEREST: 100%

MINIMUM DENOMINATION:                   $250,000 AND $1 IN EXCESS OF $250,000

DATE OF THE TRUST                       APPROXIMATE AGGREGATE SCHEDULED
AGREEMENT:                              PRINCIPAL BALANCE AS OF THE CUT-OFF
JUNE 1, 2004                            DATE OF THE MORTGAGE LOANS HELD
                                        BY THE TRUST: $699,836,637

CLOSING DATE:                           SERVICERS:
JUNE 30, 2004                           COUNTRYWIDE HOME LOANS
                                            SERVICING LP
                                        NATIONAL CITY MORTGAGE CO.

FIRST DISTRIBUTION DATE:
JULY 26, 2004

FINAL SCHEDULED                         TRUSTEE: JPMORGAN CHASE BANK
DISTRIBUTION DATE:                      CUSTODIAN: JPMORGAN CHASE BANK
JUNE 25, 2034

NO. 1                                   CUSIP NUMBER: 36228F 5T 9
                                        ISIN NUMBER: US36228F5T98

--------------------------

(11)  For each Distribution Date, the Certificate Rate for the Class B5
Certificates will equal a variable rate determined in accordance with the Trust
Agreement.

111484 GSR 2004-7
Trust Agreement

                                      B5-3

<PAGE>

                     GS MORTGAGE SECURITIES CORP., DEPOSITOR
                MORTGAGE PASS-THROUGH CERTIFICATES, SERIES 2004-7
                              CLASS B5 CERTIFICATE

      evidencing a beneficial ownership interest in a Trust consisting of the
      entire beneficial ownership of a pool of certain hybrid adjustable-rate
      single family, fully amortizing, first lien Mortgage Loans formed and sold
      by

                          GS MORTGAGE SECURITIES CORP.

THIS CERTIFICATE DOES NOT REPRESENT AN OBLIGATION OF OR INTEREST IN, AND IS NOT
GUARANTEED BY, GS MORTGAGE SECURITIES CORP., THE SERVICERS, THE TRUSTEE, THE
CUSTODIAN OR ANY OF THEIR AFFILIATES. NEITHER THIS CERTIFICATE NOR THE
UNDERLYING MORTGAGE LOANS ARE GUARANTEED BY ANY AGENCY OR INSTRUMENTALITY OF THE
UNITED STATES.

THIS CERTIFIES THAT:

                              GOLDMAN, SACHS & CO.

is the registered owner of the Percentage Interest evidenced by this Certificate
in the Class B5 Certificates (the "Class B5 Certificates") issued by the trust
(the "Trust") created pursuant to a Trust Agreement, dated as specified above
(the "Trust Agreement"), between GS Mortgage Certificates Corp., as depositor
(hereinafter the "Depositor," which term includes any successor entity under the
Trust Agreement) and JPMorgan Chase Bank, as trustee (in such capacity, the
"Trustee") and custodian (in such capacity, the "Custodian"), a summary of
certain of the pertinent provisions of which is set forth hereafter. The Trust
consists primarily of a pool of Mortgage Loans. This Certificate is issued under
and is subject to the terms, provisions and conditions of the Trust Agreement
and also is subject to certain terms and conditions set forth in the Sale
Agreements and the Servicing Agreements, to which the Sale Agreements and the
Servicing Agreements the Holder of this Certificate, by virtue of the acceptance
hereof assents and by which such Certificateholder is bound.

            Distributions on this Certificate (including the final distribution
on this Certificate) will be made out of the related Available Distribution
Amount, to the extent and subject to the limitations set forth in the Trust
Agreement, on the 25th day of each month, or if such day is not a Business Day,
the next succeeding Business Day, beginning in June 2004 (each, a "Distribution
Date"), commencing on the first Distribution Date specified above, to the Person
in whose name this Certificate is registered at the close of business on the
last Business Day of the Interest Accrual Period related to such Distribution
Date (the "Record Date"). Distributions on this Certificate will generally be
made from collections on the Mortgage Loans. All sums distributable on this
Certificate are payable in the coin or currency of the United States of America
as at the time of payment is legal tender for the payment of public and private
debts.

            Distributions on this Certificate will be paid in accordance with
the terms of the Trust Agreement, the Sale Agreements and the Servicing
Agreements. Distributions allocated to

111484 GSR 2004-7
Trust Agreement

                                      B5-4

<PAGE>

this Certificate on any Distribution Date will be an amount equal to this
Certificate's Percentage Interest of the related Available Distribution to be
distributed on this Class of Certificates as of such Distribution Date, with a
final distribution to be made upon retirement of this Certificate as set forth
in the Trust Agreement.

            By receipt of this Certificate, the Holder is deemed to represent
that: (1) it (A) is a Qualified Institutional Buyer, (B) is aware that the sale
of this Certificate to it is being made in reliance on Rule 144A and (C) is
acquiring this Certificate for its own account or for the account of a Qualified
Institutional Buyer, as the case may be and (2) it understands that this
Certificate has not been and will not be registered under the Securities Act and
may not be reoffered, resold, or otherwise transferred except (A) to person who
the Holder reasonably believes is a Qualified Institutional Buyer in a
transaction meeting the requirements of Rule 144A, and (B) in accordance with
all applicable state securities laws.

            This Certificate is one of a duly authorized issue of Certificates
designated as Mortgage Pass-Through Certificates, Series 2004-7 (herein called
the "Certificates"), and representing a Percentage Interest in the Class of
Certificates specified on the face hereof equal to the quotient, expressed as a
percentage, obtained by dividing the denomination of this Certificate specified
on the face hereof by the aggregate Certificate Principal Balance of all the
Class B5 Certificates. The Certificates are issued in multiple Classes
designated as specifically set forth in the Trust Agreement. The Certificates
will evidence in the aggregate 100% of the beneficial ownership of the Trust.

            Realized Losses and interest shortfalls on the Mortgage Loans shall
be allocated among the Classes of Certificates on the applicable Distribution
Date in the manner set forth in the Trust Agreement. To the extent provided in
the Trust Agreement, with respect to Realized Losses and interest shortfalls,
the Subordinate Certificates will be subordinated to the Senior Certificates and
each of the Subordinate Certificates will be subordinated to each of the other
Subordinate Certificates with a lower numerical class designation, if any. All
Realized Losses and interest shortfalls on the Mortgage Loans allocated to any
Class of Certificates will be allocated pro rata among the outstanding
Certificates of such Class, as described in the Trust Agreement.

            The Certificates are limited in right of payment to certain
collections and recoveries respecting the Mortgage Loans, all as more
specifically set forth in the Trust Agreement. As provided in the Trust
Agreement, withdrawals from the Collection Accounts, the Certificate Account and
related accounts shall be made from time to time for purposes other than
distributions to Holders, such purposes including reimbursement of Advances
made, or certain expenses incurred, with respect to the Mortgage Loans and
administration of the Trust.

            All distributions or allocations made with respect to each Class on
any Distribution Date shall be allocated in accordance with the Trust Agreement.
Payment shall be made either (1) by check mailed to the address of each
Certificateholder as it appears in the Certificate Register on the Record Date
immediately prior to such Distribution Date or (2) by wire transfer of
immediately available funds to the account of a Certificateholder at a bank or
other entity having appropriate facilities therefor, if such Certificateholder
shall have so notified the Trustee in writing by the Record Date immediately
prior to such Distribution Date and such

111484 GSR 2004-7
Trust Agreement

                                      B5-5

<PAGE>

Certificateholder is the registered owner of an initial Certificate Principal
Balance or Notional Amount of at least $1,000,000. The Trustee may charge the
Certificateholder a fee for any payment made by wire transfer. Final
distribution on the Certificates will be made only upon surrender of the
Certificates at the offices of the Certificate Registrar set forth in the notice
of such final distribution.

            The Trust Agreement permits, with certain exceptions therein
provided, the amendment thereof and the modification of the rights and
obligations of the Depositor, the Trustee and the Custodian and the rights of
the Certificateholders under the Trust Agreement at any time by the Depositor,
the Trustee and the Custodian with the consent of the Certificateholders
entitled to at least 51% of the Voting Rights. Any such consent by the Holder of
this Certificate shall be conclusive and binding on such Certificateholder and
upon all future Holders of this Certificate and of any Certificate issued upon
the transfer hereof or in exchange herefor or in lieu hereof whether or not
notation of such consent is made upon this Certificate. The Trust Agreement also
permits the amendment thereof, in certain limited circumstances, without the
consent of the Certificateholders.

            The Certificates are issuable in fully registered form only, without
coupons, in denominations specified in the Trust Agreement. As provided in the
Trust Agreement and subject to any limitations on transfer of this Certificate
by a Depository or its nominee and certain limitations set forth in the Trust
Agreement, the transfer of this Certificate is registrable in the Certificate
Register upon surrender of this Certificate for registration of transfer at the
principal Corporate Trust Office of the Trustee or such other offices or
agencies appointed by the Trustee for that purpose and such other locations
provided in the Trust Agreement, duly endorsed by or accompanied by an
assignment in the form below or other written instrument of transfer in form
satisfactory to, the Trustee and the Certificate Registrar duly executed by the
Certificateholder hereof, or such Certificateholder's attorney duly authorized
in writing, and thereupon one or more new Certificates of the same Class in the
same aggregate Certificate Principal Balance will be issued to the designated
transferee or transferees.

            As provided in the Trust Agreement and subject to certain
limitations therein set forth, this Certificate is exchangeable for a new
Certificate of the same Class in the same denomination. No service charge will
be made for any such registration of transfer or exchange, but the Trustee may
require payment of a sum sufficient to cover any tax or other governmental
charge that may be imposed in connection with any transfer or exchange of
Certificates.

            The Depositor, the Trustee, the Custodian and the Certificate
Registrar and any agent of the Depositor, the Trustee, the Custodian or the
Certificate Registrar may treat the Person in whose name this Certificate is
registered as the owner hereof for all purposes, and none of the Depositor, the
Trustee, the Custodian, the Certificate Registrar or any such agent shall be
affected by notice to the contrary.

            The obligations created by the Trust Agreement will terminate upon
payment to the Certificateholders of all amounts held in the Collection Accounts
and the Certificate Account required to be paid to the Certificateholders
pursuant to the Trust Agreement, following the earlier of: (i) the final payment
or other liquidation (or any advance with respect thereto) of the last Mortgage
Loan remaining in the Trust or the disposition of all property acquired upon

111484 GSR 2004-7
Trust Agreement

                                      B5-6

<PAGE>

foreclosure of any such Mortgage Loan and (ii) the repurchase of all the assets
of the Trust by Countrywide Home Loans Servicing LP or the Depositor, in
accordance with the Trust Agreement when the aggregate Scheduled Principal
Balance of the Mortgage Loans equals 10% or less of the aggregate Scheduled
Principal Balance of the Mortgage Loans as of the Cut-Off Date. Written notice
of termination will be given to each Certificateholder, and the final
distribution will be made only upon surrender and cancellation of the
Certificates at an office or agency appointed by the Trustee which will be
specified in the notice of termination.

            Any such repurchase of Mortgage Loans and property acquired in
respect of the Mortgage Loans shall be made at the Termination Price.

            Unless the certificate of authentication hereon has been executed by
the Certificate Registrar, by manual signature, this Certificate shall not be
entitled to any benefit under the Trust Agreement or be valid for any purpose.

            THIS CERTIFICATE AND THE TRUST AGREEMENT SHALL BE CONSTRUED IN
ACCORDANCE WITH, AND GOVERNED BY, THE LAWS OF THE STATE OF NEW YORK.

            The Trustee has executed this Certificate on behalf of the Trust as
Trustee under the Trust Agreement, and the Trustee shall be liable hereunder
only in respect of the assets of the Trust.

            Capitalized terms used herein and not defined herein shall have the
meaning assigned to them in the Trust Agreement.

            In the event that the terms of this Certificate conflict with the
terms of the Trust Agreement, the terms of the Trust Agreement shall control.

111484 GSR 2004-7
Trust Agreement

                                      B5-7

<PAGE>

            IN WITNESS WHEREOF, the Trustee has caused this Certificate to be
duly executed.

Dated: June 30, 2004              JPMORGAN CHASE BANK,
                                    not in its individual capacity but solely as
                                    Trustee

                                  By:___________________________________________
                                     AUTHORIZED OFFICER

                          CERTIFICATE OF AUTHENTICATION

THIS IS ONE OF THE CLASS B5 CERTIFICATES REFERRED TO IN THE WITHIN-MENTIONED
TRUST AGREEMENT.

                                  JPMORGAN CHASE BANK,
                                    as Certificate Registrar

                                  By:___________________________________________
                                     AUTHORIZED SIGNATORY

111484 GSR 2004-7
Trust Agreement

                                      B5-8

<PAGE>

                                  ABBREVIATIONS

The following abbreviations, when used in the inscription on the face of this
Certificate, shall be construed as though they were written out in full
according to applicable laws or regulations:

TEN COM -- as tenants in common       UNIF GIFT MIN ACT -- ____Custodian________
TEN ENT -- as tenants by the                                 (Cust)      (Minor)
   entireties

JT TEN -- as joint tenants with       Under Uniform Gifts to Minors Act_________
rights of survivorship and not as                                        (State)
Tenants in Common

                    Additional abbreviations may also be used
                          though not in the above list.

111484 GSR 2004-7
Trust Agreement

                                      B5-9

<PAGE>

                                FORM OF TRANSFER

FOR VALUE RECEIVED, the undersigned hereby sells, assigns and transfers unto

PLEASE INSERT SOCIAL SECURITY OR
OTHER IDENTIFYING NUMBER OF
ASSIGNEE________________________________________________________________________

________________________________________________________________________________

            (Please print or typewrite name and address of assignee) the within
Certificate and does hereby irrevocably constitute and, appoint____________
(Attorney) to transfer the said Certificate in the Certificate Register of the
within-named Trust, with full power of substitution in the premises.

Dated: ______________________          _________________________________________

                                       NOTICE: The signature to this assignment
                                       must correspond with the name as written
                                       upon the face of this certificate in
                                       every particular without alteration or
                                       enlargement or any change whatever.

______________________________

SIGNATURE GUARANTEED: The
signature must be guaranteed by a
commercial bank or trust company or
by a member firm of the New York Stock
Exchange or another national certificates
exchange. Notarized or witnessed
signatures are not acceptable.

111484 GSR 2004-7
Trust Agreement

                                     B5-10

<PAGE>

                            DISTRIBUTION INSTRUCTIONS

The assignee should include the following for purposes of distribution:

Distribution shall be made, by wire transfer or otherwise, in immediately
available funds, to ___________________________, for the account of
_____________________, account number _________________, or if mailed by check
to ______________________________. Applicable reports and statements should be
mailed to __________________________. This information is provided by
____________________________, the assignee named above, or _______________, as
agent.

111484 GSR 2004-7
Trust Agreement

                                     B5-11

<PAGE>

                                   EXHIBIT B6

                          FORM OF CLASS B6 CERTIFICATE

                     GS MORTGAGE SECURITIES CORP., DEPOSITOR
                MORTGAGE PASS-THROUGH CERTIFICATES, SERIES 2004-7
                              CLASS B6 CERTIFICATE

THE CERTIFICATE EVIDENCED HEREBY HAS NOT BEEN AND WILL NOT BE REGISTERED OR
QUALIFIED UNDER THE SECURITIES ACT OF 1933, AS AMENDED (THE "ACT"), OR THE
SECURITIES LAWS OF ANY STATE AND MAY NOT BE OFFERED, SOLD, PLEDGED, OR OTHERWISE
TRANSFERRED EXCEPT (A)(1) TO A BUYER THAT THE SELLER OF SUCH CERTIFICATE
REASONABLY BELIEVES IS A QUALIFIED INSTITUTIONAL BUYER WITHIN THE MEANING OF
RULE 144A UNDER THE SECURITIES ACT PURCHASING FOR ITS OWN ACCOUNT OR FOR THE
ACCOUNT OF A QUALIFIED INSTITUTIONAL BUYER IN A TRANSACTION MEETING THE
REQUIREMENTS OF RULE 144A OR (2) PURSUANT TO AN EFFECTIVE REGISTRATION STATEMENT
UNDER THE SECURITIES ACT AND (B) IN ACCORDANCE WITH ALL APPLICABLE SECURITIES
LAWS OF THE STATES OF THE UNITED STATES OR ANY OTHER APPLICABLE JURISDICTION.

THIS CERTIFICATE MAY NOT BE PURCHASED BY A TRANSFEREE THAT IS OR IS ACTING ON
BEHALF OF OR INVESTING THE ASSETS OF (A) AN EMPLOYEE BENEFIT PLAN OR OTHER
RETIREMENT ARRANGEMENT, INCLUDING AN INDIVIDUAL RETIREMENT ACCOUNT OR A KEOGH
PLAN, WHICH IS SUBJECT TO THE EMPLOYEE RETIREMENT INCOME SECURITY ACT OF 1974,
AS AMENDED ("ERISA"), SECTION 4975 OF THE INTERNAL REVENUE CODE OF 1986, AS
AMENDED (THE "CODE") (EACH, A "PLAN"), OR A GOVERNMENTAL PLAN AS DEFINED IN
SECTION 3(32) OF ERISA THAT IS SUBJECT TO ANY ESSENTIALLY SIMILAR FEDERAL, STATE
OR LOCAL LAW (A "SIMILAR LAW"), OTHER THAN AN INSURANCE COMPANY USING THE ASSETS
OF ITS GENERAL ACCOUNT UNDER CIRCUMSTANCES WHEREBY SUCH PURCHASE AND THE
SUBSEQUENT HOLDING OF SUCH CERTIFICATE BY SUCH INSURANCE COMPANY WOULD NOT
CONSTITUTE OR RESULT IN A NON-EXEMPT PROHIBITED TRANSACTION WITHIN THE MEANING
OF SECTION 406 OR 407 OF ERISA, SECTION 4975 OF THE CODE, OR A MATERIALLY
SIMILAR CHARACTERIZATION UNDER ANY SIMILAR LAW.

THIS CLASS B6 CERTIFICATE IS SUBORDINATED TO THE EXTENT DESCRIBED HEREIN AND IN
THE TRUST AGREEMENT REFERENCED HEREIN.

THIS CLASS B6 CERTIFICATE REPRESENTS A REMIC REGULAR INTEREST FOR FEDERAL INCOME
TAX PURPOSES.

THE PRINCIPAL OF THIS CLASS B6 CERTIFICATE IS SUBJECT TO PREPAYMENT FROM TIME TO
TIME WITHOUT SURRENDER OF OR NOTATION

111484 GSR 2004-7
Trust Agreement

                                      B6-1

<PAGE>

ON THIS CERTIFICATE. ACCORDINGLY, THE CERTIFICATE PRINCIPAL BALANCE OF THIS
CERTIFICATE MAY BE LESS THAN THAT SET FORTH BELOW. ANYONE ACQUIRING THIS
CERTIFICATE MAY ASCERTAIN ITS CURRENT CERTIFICATE PRINCIPAL BALANCE BY INQUIRY
OF THE TRUSTEE.

111484 GSR 2004-7
Trust Agreement

                                      B6-2

<PAGE>

                     GS MORTGAGE SECURITIES CORP., DEPOSITOR
                MORTGAGE PASS-THROUGH CERTIFICATES, SERIES 2004-7
                              CLASS B6 CERTIFICATE

INITIAL CERTIFICATE RATE              APPROXIMATE INITIAL CERTIFICATE
PER ANNUM: 3.948%(12)                 PRINCIPAL BALANCE OF THE CLASS B6
                                      CERTIFICATES: $1,050,537

PERCENTAGE INTEREST: 100%

MINIMUM DENOMINATION:                 $250,000 AND $1 IN EXCESS OF $250,000

DATE OF THE TRUST                     APPROXIMATE AGGREGATE SCHEDULED
AGREEMENT:                            PRINCIPAL BALANCE AS OF THE CUT-OFF
JUNE 1, 2004                          DATE OF THE MORTGAGE LOANS HELD
                                      BY THE TRUST: $699,836,637

CLOSING DATE:                         SERVICERS:
JUNE 30, 2004                         COUNTRYWIDE HOME LOANS
                                          SERVICING LP
                                      NATIONAL CITY MORTGAGE CO.

FIRST DISTRIBUTION DATE:
JULY 26, 2004

FINAL SCHEDULED                       TRUSTEE: JPMORGAN CHASE BANK
DISTRIBUTION DATE:                    CUSTODIAN: JPMORGAN CHASE BANK
JUNE 25, 2034

NO. 1                                 CUSIP NUMBER: 36228F 5U 6
                                      ISIN NUMBER: US36228F5U61

-------------------------

(12)    For each Distribution Date, the Certificate Rate for the Class B6
Certificates will equal a variable rate determined in accordance with the Trust
Agreement.

111484 GSR 2004-7
Trust Agreement

                                      B6-3

<PAGE>

                     GS MORTGAGE SECURITIES CORP., DEPOSITOR
                MORTGAGE PASS-THROUGH CERTIFICATES, SERIES 2004-7
                              CLASS B6 CERTIFICATE

      evidencing a beneficial ownership interest in a Trust consisting of the
      entire beneficial ownership of a pool of certain hybrid adjustable-rate
      single family, fully amortizing, first lien Mortgage Loans formed and sold
      by

                          GS MORTGAGE SECURITIES CORP.

THIS CERTIFICATE DOES NOT REPRESENT AN OBLIGATION OF OR INTEREST IN, AND IS NOT
GUARANTEED BY, GS MORTGAGE SECURITIES CORP., THE SERVICERS, THE TRUSTEE, THE
CUSTODIAN OR ANY OF THEIR AFFILIATES. NEITHER THIS CERTIFICATE NOR THE
UNDERLYING MORTGAGE LOANS ARE GUARANTEED BY ANY AGENCY OR INSTRUMENTALITY OF THE
UNITED STATES.

THIS CERTIFIES THAT:

                              GOLDMAN, SACHS & CO.

is the registered owner of the Percentage Interest evidenced by this Certificate
in the Class B6 Certificates (the "Class B6 Certificates") issued by the trust
(the "Trust") created pursuant to a Trust Agreement, dated as specified above
(the "Trust Agreement"), between GS Mortgage Certificates Corp., as depositor
(hereinafter the "Depositor," which term includes any successor entity under the
Trust Agreement) and JPMorgan Chase Bank, as trustee (in such capacity, the
"Trustee") and custodian (in such capacity, the "Custodian"), a summary of
certain of the pertinent provisions of which is set forth hereafter. The Trust
consists primarily of a pool of Mortgage Loans. This Certificate is issued under
and is subject to the terms, provisions and conditions of the Trust Agreement
and also is subject to certain terms and conditions set forth in the Sale
Agreements and the Servicing Agreements, to which the Sale Agreements and the
Servicing Agreements the Holder of this Certificate, by virtue of the acceptance
hereof assents and by which such Certificateholder is bound.

            Distributions on this Certificate (including the final distribution
on this Certificate) will be made out of the related Available Distribution
Amount, to the extent and subject to the limitations set forth in the Trust
Agreement, on the 25th day of each month, or if such day is not a Business Day,
the next succeeding Business Day, beginning in June 2004 (each, a "Distribution
Date"), commencing on the first Distribution Date specified above, to the Person
in whose name this Certificate is registered at the close of business on the
last Business Day of the Interest Accrual Period related to such Distribution
Date (the "Record Date"). Distributions on this Certificate will generally be
made from collections on the Mortgage Loans. All sums distributable on this
Certificate are payable in the coin or currency of the United States of America
as at the time of payment is legal tender for the payment of public and private
debts.

            Distributions on this Certificate will be paid in accordance with
the terms of the Trust Agreement, the Sale Agreements and the Servicing
Agreements. Distributions allocated to

111484 GSR 2004-7
Trust Agreement

                                      B6-4

<PAGE>

this Certificate on any Distribution Date will be an amount equal to this
Certificate's Percentage Interest of the related Available Distribution to be
distributed on this Class of Certificates as of such Distribution Date, with a
final distribution to be made upon retirement of this Certificate as set forth
in the Trust Agreement.

            By receipt of this Certificate, the Holder is deemed to represent
that: (1) it (A) is a Qualified Institutional Buyer, (B) is aware that the sale
of this Certificate to it is being made in reliance on Rule 144A and (C) is
acquiring this Certificate for its own account or for the account of a Qualified
Institutional Buyer, as the case may be and (2) it understands that this
Certificate has not been and will not be registered under the Securities Act and
may not be reoffered, resold, or otherwise transferred except (A) to person who
the Holder reasonably believes is a Qualified Institutional Buyer in a
transaction meeting the requirements of Rule 144A, and (B) in accordance with
all applicable state securities laws.

            This Certificate is one of a duly authorized issue of Certificates
designated as Mortgage Pass-Through Certificates, Series 2004-7 (herein called
the "Certificates"), and representing a Percentage Interest in the Class of
Certificates specified on the face hereof equal to the quotient, expressed as a
percentage, obtained by dividing the denomination of this Certificate specified
on the face hereof by the aggregate Certificate Principal Balance of all the
Class B6 Certificates. The Certificates are issued in multiple Classes
designated as specifically set forth in the Trust Agreement. The Certificates
will evidence in the aggregate 100% of the beneficial ownership of the Trust.

            Realized Losses and interest shortfalls on the Mortgage Loans shall
be allocated among the Classes of Certificates on the applicable Distribution
Date in the manner set forth in the Trust Agreement. To the extent provided in
the Trust Agreement, with respect to Realized Losses and interest shortfalls,
the Subordinate Certificates will be subordinated to the Senior Certificates and
each of the Subordinate Certificates will be subordinated to each of the other
Subordinate Certificates with a lower numerical class designation, if any. All
Realized Losses and interest shortfalls on the Mortgage Loans allocated to any
Class of Certificates will be allocated pro rata among the outstanding
Certificates of such Class, as described in the Trust Agreement.

            The Certificates are limited in right of payment to certain
collections and recoveries respecting the Mortgage Loans, all as more
specifically set forth in the Trust Agreement. As provided in the Trust
Agreement, withdrawals from the Collection Accounts, the Certificate Account and
related accounts shall be made from time to time for purposes other than
distributions to Holders, such purposes including reimbursement of Advances
made, or certain expenses incurred, with respect to the Mortgage Loans and
administration of the Trust.

            All distributions or allocations made with respect to each Class on
any Distribution Date shall be allocated in accordance with the Trust Agreement.
Payment shall be made either (1) by check mailed to the address of each
Certificateholder as it appears in the Certificate Register on the Record Date
immediately prior to such Distribution Date or (2) by wire transfer of
immediately available funds to the account of a Certificateholder at a bank or
other entity having appropriate facilities therefor, if such Certificateholder
shall have so notified the Trustee in writing by the Record Date immediately
prior to such Distribution Date and such

111484 GSR 2004-7
Trust Agreement

                                      B6-5

<PAGE>

Certificateholder is the registered owner of an initial Certificate Principal
Balance or Notional Amount of at least $1,000,000. The Trustee may charge the
Certificateholder a fee for any payment made by wire transfer. Final
distribution on the Certificates will be made only upon surrender of the
Certificates at the offices of the Certificate Registrar set forth in the notice
of such final distribution.

            The Trust Agreement permits, with certain exceptions therein
provided, the amendment thereof and the modification of the rights and
obligations of the Depositor, the Trustee and the Custodian and the rights of
the Certificateholders under the Trust Agreement at any time by the Depositor,
the Trustee and the Custodian with the consent of the Certificateholders
entitled to at least 51% of the Voting Rights. Any such consent by the Holder of
this Certificate shall be conclusive and binding on such Certificateholder and
upon all future Holders of this Certificate and of any Certificate issued upon
the transfer hereof or in exchange herefor or in lieu hereof whether or not
notation of such consent is made upon this Certificate. The Trust Agreement also
permits the amendment thereof, in certain limited circumstances, without the
consent of the Certificateholders.

            The Certificates are issuable in fully registered form only, without
coupons, in denominations specified in the Trust Agreement. As provided in the
Trust Agreement and subject to any limitations on transfer of this Certificate
by a Depository or its nominee and certain limitations set forth in the Trust
Agreement, the transfer of this Certificate is registrable in the Certificate
Register upon surrender of this Certificate for registration of transfer at the
principal Corporate Trust Office of the Trustee or such other offices or
agencies appointed by the Trustee for that purpose and such other locations
provided in the Trust Agreement, duly endorsed by or accompanied by an
assignment in the form below or other written instrument of transfer in form
satisfactory to, the Trustee and the Certificate Registrar duly executed by the
Certificateholder hereof, or such Certificateholder's attorney duly authorized
in writing, and thereupon one or more new Certificates of the same Class in the
same aggregate Certificate Principal Balance will be issued to the designated
transferee or transferees.

            As provided in the Trust Agreement and subject to certain
limitations therein set forth, this Certificate is exchangeable for a new
Certificate of the same Class in the same denomination. No service charge will
be made for any such registration of transfer or exchange, but the Trustee may
require payment of a sum sufficient to cover any tax or other governmental
charge that may be imposed in connection with any transfer or exchange of
Certificates.

            The Depositor, the Trustee, the Custodian and the Certificate
Registrar and any agent of the Depositor, the Trustee, the Custodian or the
Certificate Registrar may treat the Person in whose name this Certificate is
registered as the owner hereof for all purposes, and none of the Depositor, the
Trustee, the Custodian, the Certificate Registrar or any such agent shall be
affected by notice to the contrary.

            The obligations created by the Trust Agreement will terminate upon
payment to the Certificateholders of all amounts held in the Collection Accounts
and the Certificate Account required to be paid to the Certificateholders
pursuant to the Trust Agreement, following the earlier of: (i) the final payment
or other liquidation (or any advance with respect thereto) of the last Mortgage
Loan remaining in the Trust or the disposition of all property acquired upon

111484 GSR 2004-7
Trust Agreement

                                      B6-6
<PAGE>

foreclosure of any such Mortgage Loan and (ii) the repurchase of all the assets
of the Trust by Countrywide Home Loans Servicing LP or the Depositor, in
accordance with the Trust Agreement when the aggregate Scheduled Principal
Balance of the Mortgage Loans equals 10% or less of the aggregate Scheduled
Principal Balance of the Mortgage Loans as of the Cut-Off Date. Written notice
of termination will be given to each Certificateholder, and the final
distribution will be made only upon surrender and cancellation of the
Certificates at an office or agency appointed by the Trustee which will be
specified in the notice of termination.

            Any such repurchase of Mortgage Loans and property acquired in
respect of the Mortgage Loans shall be made at the Termination Price.

            Unless the certificate of authentication hereon has been executed by
the Certificate Registrar, by manual signature, this Certificate shall not be
entitled to any benefit under the Trust Agreement or be valid for any purpose.

            THIS CERTIFICATE AND THE TRUST AGREEMENT SHALL BE CONSTRUED IN
ACCORDANCE WITH, AND GOVERNED BY, THE LAWS OF THE STATE OF NEW YORK.

            The Trustee has executed this Certificate on behalf of the Trust as
Trustee under the Trust Agreement, and the Trustee shall be liable hereunder
only in respect of the assets of the Trust.

            Capitalized terms used herein and not defined herein shall have the
meaning assigned to them in the Trust Agreement.

            In the event that the terms of this Certificate conflict with the
terms of the Trust Agreement, the terms of the Trust Agreement shall control.

111484 GSR 2004-7
Trust Agreement

                                      B6-7

<PAGE>

            IN WITNESS WHEREOF, the Trustee has caused this Certificate to be
duly executed.

Dated:   June 30, 2004                  JPMORGAN CHASE BANK,
                                         not in its individual capacity but
                                         solely as Trustee

                                        By:____________________________________
                                           AUTHORIZED OFFICER

                          CERTIFICATE OF AUTHENTICATION

THIS IS ONE OF THE CLASS B6 CERTIFICATES REFERRED TO IN THE WITHIN-MENTIONED
TRUST AGREEMENT.

                                        JPMORGAN CHASE BANK,
                                         as Certificate Registrar

                                        By:_____________________________________
                                           AUTHORIZED OFFICER

111484 GSR 2004-7
Trust Agreement

                                      B6-8

<PAGE>

                                  ABBREVIATIONS

The following abbreviations, when used in the inscription on the face of this
Certificate, shall be construed as though they were written out in full
according to applicable laws or regulations:

TEN COM--as tenants in common   UNIF GIFT MIN ACT-- ____Custodian__________
TEN ENT--as tenants by the                            (Cust)           (Minor)
   entireties

JT TEN -- as joint tenants        Under Uniform Gifts to Minors Act_____________
with rights of survivorship and                                         (State)
not as Tenants in Common

                    Additional abbreviations may also be used
                          though not in the above list.

111484 GSR 2004-7
Trust Agreement

                                      B6-9

<PAGE>

                                FORM OF TRANSFER

FOR VALUE RECEIVED, the undersigned hereby sells, assigns and transfers unto

_______________________________________________________________________________

PLEASE INSERT SOCIAL SECURITY OR
OTHER IDENTIFYING NUMBER OF
ASSIGNEE_______________________________________________________________________

_______________________________________________________________________________

            (Please print or typewrite name and address of assignee)

the within Certificate and does hereby irrevocably constitute and, appoint
__________________ (Attorney) to transfer the said Certificate in the
Certificate Register of the within-named Trust, with full power of substitution
in the premises.

Dated:   ______________________   ________________________________________

                                  NOTICE: The signature to this assignment
                                  must correspond with the name as written
                                  upon the face of this certificate in
                                  every particular without alteration or
                                  enlargement or any change whatever.

_______________________________

SIGNATURE GUARANTEED: The
signature must be guaranteed
by a commercial bank or trust
company or by a member firm of
the New York Stock Exchange or
another national certificates
exchange. Notarized or
witnessed signatures are not
acceptable.

111484 GSR 2004-7
Trust Agreement

                                     B6-10

<PAGE>

                            DISTRIBUTION INSTRUCTIONS

The assignee should include the following for purposes of distribution:

Distribution shall be made, by wire transfer or otherwise, in immediately
available funds, to ___________________________, for the account of
_____________________, account number _________________, or if mailed by check
to ______________________________. Applicable reports and statements should be
mailed to __________________________. This information is provided by
____________________________, the assignee named above, or _______________, as
agent.

111484 GSR 2004-7
Trust Agreement

                                     B6-11

<PAGE>

                                    EXHIBIT R

                           FORM OF CLASS R CERTIFICATE

                     GS MORTGAGE SECURITIES CORP., DEPOSITOR
                MORTGAGE PASS THROUGH CERTIFICATES, SERIES 2004-7
                               CLASS R CERTIFICATE

ANY TRANSFEREE OF THIS CERTIFICATE MUST DELIVER TO THE TRUSTEE A RESIDUAL
TRANSFEREE AFFIDAVIT CONTAINING CERTAIN REPRESENTATIONS AND COVENANTS, AND AN
AFFIDAVIT RELATING TO VARIOUS TAX MATTERS, ALL AS DESCRIBED IN THE TRUST
AGREEMENT REFERRED TO HEREIN. NO TRANSFER OF A CLASS R CERTIFICATE SHALL BE
PERMITTED TO BE MADE TO A DISQUALIFIED ORGANIZATION, WHICH GENERALLY INCLUDES
ANY ENTITY THAT WOULD BE EXEMPT FROM FEDERAL INCOME TAXATION (INCLUDING THE TAX
ON UNRELATED BUSINESS TAXABLE INCOME) ON INCOME DERIVED FROM THIS CLASS R
CERTIFICATE. NOTWITHSTANDING THE FULFILLMENT OF THE PREREQUISITES DESCRIBED
ABOVE, THE TRUSTEE MAY REFUSE TO RECOGNIZE A TRANSFER TO THE EXTENT NECESSARY TO
AVOID A RISK OF (1) DISQUALIFICATION OF THE RELATED REMIC AS A REMIC OR (2) THE
IMPOSITION OF A TAX UPON SUCH REMIC. NO TRANSFER OF LESS THAN AN ENTIRE INTEREST
IN A CLASS R CERTIFICATE MAY BE MADE UNLESS (1) THE INTEREST TRANSFERRED IS AN
UNDIVIDED INTEREST OR (2) THE TRANSFEROR OR THE TRANSFEREE HAS PROVIDED THE
TRUSTEE WITH AN OPINION THAT THE TRANSFER WILL NOT JEOPARDIZE THE REMIC STATUS
OF THE REMIC. RESTRICTIONS ON TRANSFER OF THIS CERTIFICATE ARE DESCRIBED MORE
FULLY HEREIN.

THIS CERTIFICATE MAY NOT BE PURCHASED BY A TRANSFEREE THAT IS OR IS ACTING ON
BEHALF OF OR INVESTING THE ASSETS OF (A) AN EMPLOYEE BENEFIT PLAN OR OTHER
RETIREMENT ARRANGEMENT, INCLUDING AN INDIVIDUAL RETIREMENT ACCOUNT OR A KEOGH
PLAN, WHICH IS SUBJECT TO THE EMPLOYEE RETIREMENT INCOME SECURITY ACT OF 1974,
AS AMENDED ("ERISA"), SECTION 4975 OF THE INTERNAL REVENUE CODE OF 1986, AS
AMENDED (THE "CODE") (EACH, A "PLAN"), OR A GOVERNMENTAL PLAN AS DEFINED IN
SECTION 3(32) OF ERISA THAT IS SUBJECT TO ANY ESSENTIALLY SIMILAR FEDERAL, STATE
OR LOCAL LAW (A "SIMILAR LAW"), OTHER THAN AN INSURANCE COMPANY USING THE ASSETS
OF ITS GENERAL ACCOUNT UNDER CIRCUMSTANCES WHEREBY SUCH PURCHASE AND THE
SUBSEQUENT HOLDING OF SUCH CERTIFICATE BY SUCH INSURANCE COMPANY WOULD NOT
CONSTITUTE OR RESULT IN A NON-EXEMPT PROHIBITED TRANSACTION WITHIN THE MEANING
OF SECTION 406 OR 407 OF ERISA, SECTION 4975 OF THE CODE, OR A MATERIALLY
SIMILAR CHARACTERIZATION UNDER ANY SIMILAR LAW.

111484 GSR 2004-7
Trust Agreement

                                      R-1

<PAGE>

THIS CLASS R CERTIFICATE REPRESENTS A REMIC RESIDUAL INTEREST IN TWO "REMICS,"
AS DESCRIBED IN THE TRUST AGREEMENT UNDER THE INTERNAL REVENUE CODE OF 1986, AS
AMENDED, FOR FEDERAL INCOME TAX PURPOSES.

THE PRINCIPAL OF THIS CLASS R CERTIFICATE IS SUBJECT TO PREPAYMENT FROM TIME TO
TIME WITHOUT SURRENDER OF OR NOTATION ON THIS CERTIFICATE. ACCORDINGLY, THE
CERTIFICATE PRINCIPAL BALANCE OF THIS CERTIFICATE MAY BE LESS THAN THAT SET
FORTH BELOW. ANYONE ACQUIRING THIS CERTIFICATE MAY ASCERTAIN ITS CURRENT
CERTIFICATE PRINCIPAL BALANCE BY INQUIRY OF THE TRUSTEE.

111484 GSR 2004-7
Trust Agreement

                                     R-2

<PAGE>

                     GS MORTGAGE SECURITIES CORP., DEPOSITOR
                MORTGAGE PASS-THROUGH CERTIFICATES, SERIES 2004-7
                               CLASS R CERTIFICATE

INITIAL CERTIFICATE RATE PER   AGGREGATE INITIAL CERTIFICATE
ANNUM:  4.191%(13)             PRINCIPAL BALANCE OF THE CLASS R
                               CERTIFICATE:  $100

PERCENTAGE INTEREST:  100%

DATE OF THE TRUST              APPROXIMATE AGGREGATE SCHEDULED PRINCIPAL
AGREEMENT:                     BALANCE AS OF THE CUT-OFF DATE OF THE MORTGAGE
JUNE 1, 2004                   LOANS HELD BY THE  TRUST: $699,836,637

CLOSING DATE:                  SERVICERS:
JUNE 30, 2004                  COUNTRYWIDE HOME LOANS SERVICING LP
                               NATIONAL CITY MORTGAGE CO.

FIRST DISTRIBUTION DATE:
JULY 26, 2004

FINAL SCHEDULED                TRUSTEE:  JPMORGAN CHASE BANK
DISTRIBUTION DATE:             CUSTODIAN:  JPMORGAN CHASE BANK
JUNE 25, 2034

NO. 1                          CUSIP NUMBER:  36228F 4W 3
                               ISIN NUMBER: US36228F4W37

________________________

(13) For each Distribution Date, the Certificate Rate for the Class 1A1
Certificates will equal a variable rate determined in accordance with the Trust
Agreement.

111484 GSR 2004-7
Trust Agreement

                                     R-3

<PAGE>

                          GS MORTGAGE SECURITIES CORP.
         MORTGAGE PARTICIPATION PASS THROUGH CERTIFICATES, SERIES 2004-7
                               CLASS R CERTIFICATE

            evidencing a beneficial ownership interest in a Trust consisting of
            the entire beneficial ownership of a pool of certain hybrid
            adjustable-rate single family, fully amortizing, first lien Mortgage
            Loans formed and sold by

                          GS MORTGAGE SECURITIES CORP.

THIS CERTIFICATE DOES NOT REPRESENT AN OBLIGATION OF OR INTEREST IN, AND IS NOT
GUARANTEED BY, GS MORTGAGE SECURITIES CORP., THE SERVICERS, THE TRUSTEE, THE
CUSTODIAN OR ANY OF THEIR AFFILIATES. NEITHER THIS CERTIFICATE NOR THE
UNDERLYING MORTGAGE LOANS ARE GUARANTEED BY ANY AGENCY OR INSTRUMENTALITY OF THE
UNITED STATES.

THIS CERTIFIES THAT:

                              GOLDMAN, SACHS & CO.

is the registered owner of the Percentage Interest evidenced by this Certificate
in the Class R Certificates (the "Class R Certificates") issued by the trust
(the "Trust") created pursuant to a Trust Agreement, dated as specified above
(the "Trust Agreement"), between GS Mortgage Certificates Corp., as depositor
(hereinafter the "Depositor," which term includes any successor entity under the
Trust Agreement) and JPMorgan Chase Bank, as trustee (in such capacity, the
"Trustee") and custodian (in such capacity, the "Custodian"), a summary of
certain of the pertinent provisions of which is set forth hereafter. The Trust
consists primarily of a pool of Mortgage Loans. This Certificate is issued under
and is subject to the terms, provisions and conditions of the Trust Agreement
and also is subject to certain terms and conditions set forth in the Sale
Agreements and the Servicing Agreements, to which the Sale Agreements and the
Servicing Agreements the Holder of this Certificate, by virtue of the acceptance
hereof assents and by which such Certificateholder is bound.

            Distributions on this Certificate (including the final distribution
on this Certificate) will be made out of the related Available Distribution
Amount, to the extent and subject to the limitations set forth in the Trust
Agreement, on the 25th day of each month, or if such day is not a Business Day,
the next succeeding Business Day, beginning in June 2004 (each, a "Distribution
Date"), commencing on the first Distribution Date specified above, to the Person
in whose name this Certificate is registered at the close of business on the
last Business Day of the Interest Accrual Period related to such Distribution
Date (the "Record Date"). All sums distributable on this Certificate are payable
in the coin or currency of the United States of America as at the time of
payment is legal tender for the payment of public and private debts.

            Distributions on this Certificate will be paid in accordance with
the terms of the Trust Agreement. Distributions allocated to this Certificate on
any Distribution Date will be an amount equal to this Certificate's Percentage
Interest of the Available Distribution Amount to be

111484 GSR 2004-7
Trust Agreement

                                     R-4

<PAGE>

distributed on this Class of Certificates as of such Distribution Date, with a
final distribution to be made upon retirement of this Certificate as set forth
in the Trust Agreement.

            This Certificate is one of a duly authorized issue of Certificates
designated as Mortgage Pass-Through Certificates, Series 2004-7 (herein called
the "Certificates"), and representing a Percentage Interest in the Class of
Certificates specified on the face hereof equal to the quotient, expressed as a
percentage, obtained by dividing the denomination of this Certificate specified
on the face hereof by the aggregate Certificate Principal Balance of the Class R
Certificate. The Certificates are issued in multiple Classes designated as
specifically set forth in the Trust Agreement. This Certificate will evidence in
the aggregate 100% of the balance of the Class R Certificate.

            Realized Losses and interest shortfalls on the Mortgage Loans shall
be allocated among the Classes of Certificates on the applicable Distribution
Date in the manner set forth in the Trust Agreement. To the extent provided in
the Trust Agreement, with respect to Realized Losses and interest shortfalls,
the Subordinate Certificates will be subordinated to the Senior Certificates and
each of the Subordinate Certificates will be subordinated to each of the other
Subordinate Certificates with a lower numerical class designation, if any. All
Realized Losses and interest shortfalls on the Mortgage Loans allocated to any
Class of Certificates will be allocated pro rata among the outstanding
Certificates of such Class, as described in the Trust Agreement.

            The Certificates are limited in right of payment to certain
collections and recoveries in respect of the Mortgage Loans, all as more
specifically set forth in the Trust Agreement. As provided in the Trust
Agreement, withdrawals from the Collection Accounts, the Certificate Account and
related accounts shall be made from time to time for purposes other than
distributions to Certificateholders, such purposes including reimbursement of
Advances made, or certain expenses incurred, with respect to the Mortgage Loans
and administration of the Trust.

            All distributions or allocations made with respect to each Class on
any Distribution Date shall be allocated pro rata among the outstanding
Certificates of such Class based on the Certificate Principal Balance of each
such Certificate. Payment shall be made by check mailed to the address of each
Certificateholder as it appears in the Certificate Register on the Record Date
immediately prior to such Distribution Date. Final distribution on the
Certificates will be made only upon surrender of the Certificates at the offices
of the Certificate Registrar set forth in the notice of such final distribution.

            Elections will be made to treat the segregated portions of the Trust
as two real estate mortgage investment conduits (each, a "REMIC") under the
Internal Revenue Code of 1986, as amended (the "Code"). Assuming that the
election is made properly and that certain qualification requirements concerning
the Mortgage Loans and the Certificates are met, the Holder of this Certificate
will be treated for federal income tax purposes as the beneficial owner of the
"residual interest" in each REMIC. Accordingly, the Holder of this Class R
Certificate will be subject to tax on its pro rata share of the taxable income
or net loss on such Holder's "residual interest" in each REMIC. The requirement
that the Holder of this Class R Certificate report its pro rata share of such
income or loss will continue until there are no Certificates of any Class
outstanding.

111484 GSR 2004-7
Trust Agreement

                                     R-5

<PAGE>

            Pursuant to (and subject to the limitations set forth in) the Trust
Agreement, the Trustee or one of its affiliates, as agent of each REMIC (the
"Tax Matters Person" or "TMP"), will provide each Holder of a Class R
Certificate with information sufficient to enable such Certificateholder to
prepare (i) its federal income tax and information returns and (ii) any reports
required by the Code regarding the Certificates, except where such information
is provided to each such Certificateholder by the Trustee pursuant to the Trust
Agreement. As the holder of the residual interest in each REMIC, the Holder of a
Class R Certificate will have continuing administrative rights and obligations
generally similar to those of a partner with respect to its partnership. Such
rights and obligations principally concern the REMIC's federal income tax and
information returns and the representation of the REMIC in administrative or
judicial proceedings involving the Internal Revenue Service. The TMP, however,
will act on behalf of the Holders of the Class R Certificate as each REMIC's
representative for such proceedings. The REMIC's federal tax and information
returns will be prepared by the TMP, and signed and filed by the Trustee.
Pursuant to the Trust Agreement, if the TMP is unable for any reason to fulfill
its duties as TMP, then the Holder of the largest Percentage Interest of the
Class R Certificate, without compensation, shall become the successor TMP for
each REMIC.

            By accepting this Certificate, the Holder of this Certificate agrees
to be bound by the provisions of the Trust Agreement, and in particular, agrees
that it shall (i) take any action required by the Code or Treasury regulations
thereunder in order to create or maintain the REMIC status of any REMIC and (ii)
refrain from taking any action that could endanger such status.

            The Trust Agreement permits, with certain exceptions therein
provided, the amendment thereof and the modification of the rights and
obligations of the Depositor, the Trustee and the Custodian and the rights of
the Certificateholders under the Trust Agreement at any time by the Depositor,
the Trustee and the Custodian with the consent of the Certificateholders
entitled to at least 51% of the Voting Rights. Any such consent by the Holder of
this Certificate shall be conclusive and binding on such Certificateholder and
upon all future Holders of this Certificate and of any Certificate issued upon
the transfer hereof or in exchange herefor or in lieu hereof whether or not
notation of such consent is made upon this Certificate. The Trust Agreement also
permits the amendment thereof, in certain limited circumstances, without the
consent of the Certificateholders.

            The Certificates are issuable in fully registered form only, without
coupons, in denominations specified in the Trust Agreement. As provided in the
Trust Agreement and subject to certain limitations set forth in the Trust
Agreement, the transfer of this Certificate is registrable in the Certificate
Register upon surrender of this Certificate for registration of transfer at the
principal Corporate Trust Office of the Trustee or such other offices or
agencies appointed by the Trustee for that purpose and such other locations
provided in the Trust Agreement, duly endorsed by, or accompanied by an
assignment in the form below or other written instrument of transfer in form
satisfactory to, the Trustee and the Certificate Registrar duly executed by the
Certificateholder hereof, or such Certificateholder's attorney duly authorized
in writing, and thereupon one or more new Certificates of the same Class in the
same aggregate Certificate Principal Balance will be issued to the designated
transferee or transferees.

111484 GSR 2004-7
Trust Agreement

                                     R-6

<PAGE>

            As provided in the Trust Agreement and subject to certain
limitations therein set forth, this Certificate is exchangeable for a new
Certificate of the same Class in the same denomination. No service charge will
be made for any such registration of transfer or exchange, but the Trustee may
require payment of a sum sufficient to cover any tax or other governmental
charge that may be imposed in connection with any transfer or exchange of
Certificates.

            No transfer of any Class R Certificate shall be made unless that
transfer is made pursuant to an effective registration statement under the
Securities Act of 1933, as amended (the "Act") and effective registration or
qualification under applicable state certificates laws, or is made in a
transaction that does not require such registration or qualification. In the
event that a transfer is to be made without registration or qualification under
the Act and applicable state certificates laws, the Trustee shall require that
the transferee certify as to facts that, if true, would mean that the proposed
transferee is a Qualified Institutional Buyer. Neither the Depositor nor the
Trustee is obligated to register or qualify any of the Class R Certificate under
the Act or any other certificates law or to take any action not otherwise
required under the Trust Agreement to permit the transfer of such Certificates
without such registration or qualification. Any such Certificateholder desiring
to effect such transfer shall, and does hereby agree to, indemnify the Depositor
and the Trustee against any liability that may result if the transfer is not
exempt from registration under the Act and all applicable state certificates
laws or is not made in accordance with such federal and state laws.

            Notwithstanding anything herein to the contrary, any purported
transfer of a Class R Certificate to or on behalf of a Plan Investor shall be
null and void.

            In addition, the Trustee shall not register any transfer of a Class
R Certificate (including any beneficial interest therein) to a Disqualified
Organization. In addition, no Class R Certificate (or any beneficial interest
therein) may be transferred unless the proposed transferee thereof provides the
Trustee with a Residual Transferee Affidavit, which is an affidavit of the
proposed transferee substantially in the form attached as Exhibit F to the
Standard Terms, and the proposed transferor provides a certificate substantially
in the form attached as Exhibit G to the Standard Terms. Notwithstanding the
fulfillment of the prerequisites described above, the Trustee may refuse to
recognize any transfer to the extent necessary to avoid a risk of (i)
disqualification of REMIC I, REMIC II or REMIC III as a REMIC or (ii) the
imposition of a tax upon any REMIC. Any attempted transfer in violation of the
foregoing restrictions shall be null and void and shall not be recognized by the
Trustee.

            If a tax or a reporting cost is borne by the REMIC as a result of
the transfer of a Class R Certificate (or any beneficial interest therein) in
violation of the restrictions set forth herein and in the Trust Agreement, the
Trustee shall pay such tax or reporting cost with amounts that otherwise would
have been paid to the transferee of the Class R Certificate (or beneficial
interest therein). In that event, neither the transferee nor the transferor
shall have any right to seek repayment of such amounts from the Depositor or the
Trustee, the Trust, any REMIC, or any other Holders, and none of such parties
shall have any liability for payment of any such tax or reporting cost.

            The Depositor, the Trustee, the Custodian and the Certificate
Registrar and any agent of the Depositor, the Trustee, the Custodian or the
Certificate Registrar may treat the

111484 GSR 2004-7
Trust Agreement

                                     R-7

<PAGE>

Person in whose name this Certificate is registered as the owner hereof for all
purposes, and none of the Depositor, the Trustee, the Custodian, the Certificate
Registrar or any such agent shall be affected by notice to the contrary.

            The obligations created by the Trust Agreement will terminate upon
payment to the Certificateholders of all amounts held in the Collection Accounts
and the Certificate Account required to be paid to the Certificateholders
pursuant to the Trust Agreement, following the earlier of: (i) the final payment
or other liquidation (or any advance with respect thereto) of the last Mortgage
Loan remaining in the Trust or the disposition of all property acquired upon
foreclosure of any such Mortgage Loan and (ii) the repurchase of all the assets
of the Trust by Countrywide Home Loans Servicing LP or the Depositor, in
accordance with the Trust Agreement when the aggregate Scheduled Principal
Balance of the Mortgage Loans equals 10% or less of the aggregate Scheduled
Principal Balance of the Mortgage Loans as of the Cut-Off Date. Written notice
of termination will be given to each Certificateholder, and the final
distribution will be made only upon surrender and cancellation of the
Certificates at an office or agency appointed by the Trustee which will be
specified in the notice of termination.

            Any such repurchase of Mortgage Loans and property acquired in
respect of the Mortgage Loans shall be made at the Termination Price.

            Unless the certificate of authentication hereon has been executed by
the Certificate Registrar, by manual signature, this Certificate shall not be
entitled to any benefit under the Trust Agreement or be valid for any purpose.

            THIS CERTIFICATE AND THE TRUST AGREEMENT SHALL BE CONSTRUED IN
ACCORDANCE WITH, AND GOVERNED BY, THE LAWS OF THE STATE OF NEW YORK.

            The Trustee has executed this Certificate on behalf of the Trust as
Trustee under the Trust Agreement, and the Trustee shall be liable hereunder
only in respect of the assets of the Trust.

            Capitalized terms used herein and not otherwise defined shall have
the meaning given them in the Trust Agreement.

            In the event that the terms of this Certificate conflict with the
terms of the Trust Agreement, the terms of the Trust Agreement shall control.

111484 GSR 2004-7
Trust Agreement

                                     R-8

<PAGE>

            IN WITNESS WHEREOF, the Trustee has caused this Certificate to be
duly executed.

Dated:   June 30, 2004           JPMORGAN CHASE BANK
                                   not in its individual capacity but solely
                                   as Trustee

                                 By:____________________________________
                                     AUTHORIZED OFFICER

                          CERTIFICATE OF AUTHENTICATION

THIS IS ONE OF THE CLASS R CERTIFICATES REFERRED TO IN THE WITHIN-MENTIONED
TRUST AGREEMENT.

                                 JPMORGAN CHASE BANK,
                                   as Certificate Registrar

                                 By:_____________________________________
                                      AUTHORIZED SIGNATORY

111484 GSR 2004-7
Trust Agreement

                                     R-9

<PAGE>

                                  ABBREVIATIONS

The following abbreviations, when used in the inscription on the face of this
Certificate, shall be construed as though they were written out in full
according to applicable laws or regulations:

TEN COM--as tenants in common    UNIF GIFT MIN ACT--  ____Custodian__________
TEN ENT--as tenants by the                            (Cust)           (Minor)
  entireties

JT TEN--as joint tenants with    Under Uniform Gifts to Minors Act______________
rights of survivorship andnot                                       (State)
as Tenants in Common

                    Additional abbreviations may also be used
                          though not in the above list.

111484 GSR 2004-7
Trust Agreement

                                     R-10

<PAGE>

                                FORM OF TRANSFER

FOR VALUE RECEIVED, the undersigned hereby sells, assigns and transfers unto
______________________________________________________________________________

PLEASE INSERT SOCIAL SECURITY OR
OTHER IDENTIFYING NUMBER OF
ASSIGNEE______________________________________________________________________

______________________________________________________________________________

            (Please print or typewrite name and address of assignee)

the within Certificate and does hereby irrevocably constitute and, appoint
__________________ (Attorney) to transfer the said Certificate in the
Certificate Register of the within named Trust, with full power of substitution
in the premises.

Dated: ____________________    _________________________________________

                               NOTICE: The signature to this assignment
                               must correspond with the name as written
                               upon the face of this certificate in
                               every particular without alteration or
                               enlargement or any change whatever.

_______________________________

SIGNATURE GUARANTEED: The
signature must be guaranteed
by a commercial bank or trust
company or by a member firm of
the New York Stock Exchange or
another national certificates
exchange. Notarized or
witnessed signatures are not
acceptable.

111484 GSR 2004-7
Trust Agreement

                                     R-11

<PAGE>

                            DISTRIBUTION INSTRUCTIONS

The assignee should include the following for purposes of distribution:

Distribution shall be made, by wire transfer or otherwise, in immediately
available funds, to ___________________________, for the account of
_____________________, account number _________________, or if mailed by check
to ______________________________. Applicable reports and statements should be
mailed to __________________________. This information is provided by
____________________________, the assignee named above, or _______________, as
agent.

111484 GSR 2004-7
Trust Agreement

                                     R-12